Tip
See the Remarks section of the OrderedDitherer class for more details and examples.
public static OrderedDitherer Bayer4x4 { get; }
Public Shared ReadOnly Property Bayer4x4 As OrderedDitherer
Get
public:
static property OrderedDitherer^ Bayer4x4 {
OrderedDitherer^ get ();
}
static member Bayer4x4 : OrderedDitherer with get
public static IReadWriteBitmapData ToDitheredBayer4x4(IReadWriteBitmapData source, IQuantizer quantizer)
{
IDitherer ditherer = OrderedDitherer.Bayer4x4;
// a.) this solution returns a new bitmap data and does not change the original one:
return source.Clone(quantizer.PixelFormatHint, quantizer, ditherer);
// b.) alternatively, you can perform the dithering directly on the source bitmap data:
source.Dither(quantizer, ditherer);
return source;
}
The example above may produce the following results:
Original image | Quantized and dithered image |
---|---|
|
|
|
|