InterleavedGradientNoiseDitherer Class

Provides an IDitherer implementation for applying an interleaved gradient noise pattern to the dithered result. For other noise-like ditherers see the OrderedDitherer.BlueNoise property and the RandomNoiseDitherer class.

Definition

Namespace: KGySoft.Drawing.Imaging
Assembly: KGySoft.Drawing.Core (in KGySoft.Drawing.Core.dll) Version: 8.1.0
C#
public sealed class InterleavedGradientNoiseDitherer : IDitherer
Inheritance
Object    InterleavedGradientNoiseDitherer
Implements
IDitherer

Remarks

  Note

The noise generated by the InterleavedGradientNoiseDitherer is not random but based on a formula so using the same source image, quantizer and strength produces always the same result (similarly to the BlueNoise ditherer, which is based on ordered dithering). To dither images with real random noise use the RandomNoiseDitherer, which applies white noise to the quantized source.

The following table demonstrates the effect of the dithering:

Original image
Quantized image

Color hues with alpha gradient
Color hues with alpha gradient

Color hues with system default 8 BPP palette and silver background
Quantizing with system default 8 BPP palette, no dithering

Color hues with system default 8 BPP palette, using silver background and interleaved gradient noise dithering
Quantizing with system default 8 BPP palette and interleaved gradient noise dithering

Grayscale color shades with different bit depths
Grayscale color shades

Grayscale color shades with black and white palette
Quantizing with black and white palette, no dithering

Grayscale color shades with black and white palette using interleaved gradient noise dithering
Quantizing with black and white palette and interleaved gradient noise dithering

Constructors

InterleavedGradientNoiseDitherer(AutoStrengthMode) Initializes a new instance of the RandomNoiseDitherer class with a specific auto strength strategy.
InterleavedGradientNoiseDitherer(Single) Initializes a new instance of the InterleavedGradientNoiseDitherer class.

Extension Methods

InitializeAsync Gets an IDitheringSession instance potentially asynchronously that can be used to dither the result of the specified IQuantizingSession applied to the specified source. If ditherer is a known ditherer that can be evaluated quickly, then this method might be executed synchronously.
This method is available in.NET Framework 4.0 and above.
(Defined by DithererExtensions)

See Also