This method converts images from one bit count to another.
Parameters
pixelType
The number of bits per pixel (1, 4, 8, 16, 24,
32, 40, 80) after the conversion
* 4 represents 4 bit color, 40 is for 4 bit
grayscale, 8 is for 8 bit color, and 80 is for 8 bit grayscale.
fixPalette
Fixed palette settings (Use when decreasing or
increasing to 1, 4, or 8 bit color)
False: Uses a created palette most suitable for
the image
True: Uses a fixed palette
dithering
Sets the dither (error diffusion) (Use when
decreasing to 1, 4, or 8 bit color or 4 bit grayscale)
False(0): Does not dither
True(nonzero): Dithers
level
Threshold value settings (Use when decreasing to
1 bit images)
0 to 255
Return Value
Returns True if successful. Returns False if unsuccessful.
Explanation
The ConvertColor method changes the number of colors (also known as the bit count) of a raster image.
To execute the ConvertColor method, set the image handle of the image in the Image property or the Layer(LayerNumber).Image property. When decreasing the number of colors of an image to 1 bit color, if the RGB value (an average of the red, green, and blue values) is less than the threshold value, the palette is set to 0, otherwise it is set to 1.
If the ConvertColor method is successful and the DestinationAsImageKitImage property is True, the resulting image will be set in the Image property or in the Layer(LayerNumber).Image property, according to the value set in the LayerNumber property.
If the ConvertColor method is successful and the DestinationAsImageKitImage property is False, the resulting image will be set in the DestinationImage property.
The ConvertColor method supports 1, 4, 8, 16, 24, and 32 bit images.
See Also
ImageKit.Effect Members | Newtone.ImageKit.Win.ImageKit