This method always returns a new OrderedDitherer instance instead of changing the strength of the original one. This is required for the static properties so they can return a cached instance.
public OrderedDitherer ConfigureStrength( float strength )
Public Function ConfigureStrength ( strength As Single ) As OrderedDitherer
public: OrderedDitherer^ ConfigureStrength( float strength )
member ConfigureStrength : strength : float32 -> OrderedDitherer
If strength is too low, then banding may appear in the result in place of gradients in the original image; whereas if strength is too high, then dithering patterns may appear even in colors without quantization error (overdithering).
If strength is 0, then strength will be calibrated for each dithering session so that neither the black, nor the white colors will suffer from overdithering in the result. This is the default for OrderedDitherer instances returned by the static properties.
The following table demonstrates the effect of different strengths:
|Original image||Quantized image|
// getting a predefined ditherer with custom strength: IDitherer ditherer = OrderedDitherer.Bayer8x8.ConfigureStrength(0.5f);
|ArgumentOutOfRangeException||strength must be between 0 and 1, inclusive bounds.|