to4bit
Top  Previous  Next

to4bit ( integer Input, integer Output )

Use this function to convert an image or selection into a 16-color bitmap. To reduce the number of colors in the image down to 16, this function uses the median-cut color quantization algorithm searching for color clusters in the RGB coordinate space.

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

grabIm (1)  
to4bit (1,2)  
saveIm (2,"C:\\test4.tif")