floyd
Top  Previous  Next

floyd ( integer Input, integer Output )

Use this function to apply the Floyd-Steinberg dithering to an image or selection. The filter uses an error diffusion technique to convert a grayscale or true color images into a one bit per channel image.

Parameters

Input  
 
An integer between 0 and 116 specifying the input image frame number. A value of 0 represents the DMA memory buffer of the video device. Values in the range of 100-116 correspond to hidden frames.  
 
Output  
 
An integer between 1 and 116 specifying the output image frame number. Values in the range of 100-116 correspond to hidden frames.  
 
Error flags

ERR_OK  
 
The flag set if successful.  
 
ERR_FAILED  
 
The flag set if failed.  

Example

This set of statements continuously captures an image and applies the Floyd-Steinberg filter to it:  
 
do  
grabIm (0)  
floyd (0, 1)  
loop while getError()=ERR_OK