|
to8bit
|
|
|
|
| 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.
|
|
|
| Colors
|
|
|
| An integer between 1 and 255 specifying the number of colors to be included in the output image color palette.
|
|
|
| Mode
|
|
|
| An optional enumerated integer that describes the color quantization mode to use. Must be one of the following values:
|
|
|
| CQ_MEDIAN=0 - fast mode based on the median-cut method that searches for clusters of colors in the RGB coordinate space. If the input image is a pseudo-colored gray one, this mode will convert the image into an 8-bit colored image preserving the display palette. This feature can be used to export pseudo-colored images to other programs.
|
| CQ_OCTAL=1 - octal tree mode based on more precise method of color reduction that uses the tree of colors. The algorithms treats colors in the images as leaves on a tree and trims "smaller branches" until the number of "leaves" becomes less or equal to Colors.
|
| CQ_HALFTONE=2 halftone mode that creates a dithered output image using 256 colors from the standard halftone palette. The colors in the halftone palette are evenly distributed throughout RGB coordinate space.
|
| Note that the Colors parameter has no effect in this mode as the output image palette will always contain 256 colors.
|
| Default value: CQ_MEDIAN
|
|
|
| ERR_OK
|
|
|
| The flag set if successful.
|
|
|
| ERR_FAILED
|
|
|
| The flag set if failed.
|
| grabIm (1)
|
| to8bit (1,2,256,CQ_OCTAL)
|
| saveIm (2,"C:\\test8.tif")
|