OrderedDithererBlueNoise Property
Gets an
OrderedDitherer using a fixed 64x64 blue noise pattern of 256 different values.
Namespace: KGySoft.Drawing.ImagingAssembly: KGySoft.Drawing.Core (in KGySoft.Drawing.Core.dll) Version: 8.2.0
public static OrderedDitherer BlueNoise { get; }
Public Shared ReadOnly Property BlueNoise As OrderedDitherer
Get
public:
static property OrderedDitherer^ BlueNoise {
OrderedDitherer^ get ();
}
static member BlueNoise : OrderedDitherer with get
Property Value
OrderedDitherer Generating random blue noise patterns is a very resource intensive operation but this method uses a pregenerated fix pattern, which is very fast.
To dither images with real random noise use the
RandomNoiseDitherer, which applies white noise to the quantized source.
The following example demonstrates how to use the ditherer returned by this property:
public static IReadWriteBitmapData ToDitheredBlueNoise(IReadWriteBitmapData source, IQuantizer quantizer)
{
IDitherer ditherer = OrderedDitherer.BlueNoise;
// 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 |
---|
Color hues with alpha gradient
| |
Grayscale color shades
| |
See the
Remarks section of the
OrderedDitherer class for more details and examples.