Assembly: AForge.Imaging (in AForge.Imaging.dll) Version: 184.108.40.206 (220.127.116.11)
public abstract class ErrorDiffusionColorDithering
The class is the base class for color dithering algorithms based on error diffusion.
Color dithering with error diffusion is based on the idea that each pixel from the specified source image is substituted with a best matching color (or better say with color's index) from the specified color table. However, the error (difference between color value in the source image and the best matching color) is diffused to neighbor pixels of the source image, which affects the way those pixels are substituted by colors from the specified table.
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 color table - 4 bpp result for color tables with 16 colors or less; 8 bpp result for larger color tables.