See the Remarks section for details and some examples.
KGySoft.Drawing.ImagingRandomNoiseDitherer
Namespace: KGySoft.Drawing.Imaging
Assembly: KGySoft.Drawing.Core (in KGySoft.Drawing.Core.dll) Version: 7.0.0-preview.2
The RandomNoiseDitherer type exposes the following members.
Name | Description | |
---|---|---|
![]() ![]() | RandomNoiseDitherer |
Initializes a new instance of the RandomNoiseDitherer class.
See the Examples section for some examples. |
Name | Description | |
---|---|---|
![]() | 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.
(Defined by DithererExtensions.)This method is available in.NET Framework 4.0 and above. |
The RandomNoiseDitherer generates some random white noise to the quantized source.
![]() |
---|
There are also a couple of ditherers with non-random noise-like patterns in this library. See also the OrderedDitherer.BlueNoise property and the InterleavedGradientNoiseDitherer class. |
To get always the same result for the same source image and quantizer you can specify a seed when initializing a RandomNoiseDitherer instance. Please note though that specifying a seed prevents parallel processing, which makes performance worse on multi-core systems.
The following table demonstrates the effect of the dithering:
Original image | Quantized image |
---|---|
|
|
|
|