![]() |
|
||||||||||||||||||||||||||||||||||||||||||||||
|
|||||||||||||||||||||||||||||||||||||||||||||||
|
|||||||||||||||||||||||||||||||||||||||||||||||
|
|||||||||||||||||||||||||||||||||||||||||||||||
|
|||||||||||||||||||||||||||||||||||||||||||||||
|
|||||||||||||||||||||||||||||||||||||||||||||||
This method allows you to do color reduction on a canvas using a variety of palette, dither and color options. You can use many formats of palette, see XPalette. Additionally you may need to supply a number of colors for the color reduction. The dither parameter determines whether dithering is performed when the colors in the image are reduced. ImageGlue uses a highly optimized Floyd-Steinberg diffusion dither for speed and quality. Please note that video drivers expect that colors like black and white will always be present in an image. ImageGlue may remove these colors if they are not required. This means you may have problems drawing one color reduced canvas onto another. This operation is only valid for raster images so if the canvas is not in raster format it will be rasterized for you. |
|||||||||||||||||||||||||||||||||||||||||||||||
|
|||||||||||||||||||||||||||||||||||||||||||||||
[C#]
[Visual Basic]
The code above reduces the image to 64 level grayscale and then saves it as a JPEG. Two sample images are shown below.
|