The class implements ordered color dithering as described on Wikipedia. The algorithm achieves dithering by applying a
The image processing routine accepts 24/32 bpp color images for processing. As a result this routine produces 4 bpp or 8 bpp indexed image, which depends on size of the specified
Sample usage:
// create color image quantization routine ColorImageQuantizer ciq = new ColorImageQuantizer( new MedianCutQuantizer( ) ); // create 256 colors table Color[] colorTable = ciq.CalculatePalette( image, 256 ); // create dithering routine OrderedColorDithering dithering = new OrderedColorDithering( ); dithering.ColorTable = colorTable; // apply the dithering routine Bitmap newImage = dithering.Apply( image );
Initial image:
Result image: