public Apply ( |
||
sourceImage | Source image to do color dithering for. | |
리턴 |
public static Bitmap OrderedColorDithering(Bitmap bmp, int value) { // create color image quantization routine ColorImageQuantizer ciq = new ColorImageQuantizer(new MedianCutQuantizer()); // create 256 colors table Color[] colorTable = ciq.CalculatePalette(bmp, value); // create dithering routine OrderedColorDithering dithering = new OrderedColorDithering(); dithering.ColorTable = colorTable; // apply the dithering routine Bitmap newImage = dithering.Apply(bmp); return newImage; }