Tip
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.
public sealed class RandomNoiseDitherer : IDitherer
Public NotInheritable Class RandomNoiseDitherer
Implements IDitherer
public ref class RandomNoiseDitherer sealed : IDitherer
[<SealedAttribute>]
type RandomNoiseDitherer =
class
interface IDitherer
end
The RandomNoiseDitherer generates some random white noise to the quantized source.
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 |
---|---|
|
|
|
|
RandomNoiseDitherer(AutoStrengthMode, NullableInt32) | Initializes a new instance of the RandomNoiseDitherer class with a specific auto strength strategy. |
RandomNoiseDitherer(Single, NullableInt32) | Initializes a new instance of the RandomNoiseDitherer class. |
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) |