Note
This method always returns a new ErrorDiffusionDitherer instance instead of changing the processing direction of the original one.
This is required for the static properties so they can return a cached instance.
public ErrorDiffusionDitherer ConfigureProcessingDirection(
bool serpentine
)Public Function ConfigureProcessingDirection (
serpentine As Boolean
) As ErrorDiffusionDithererpublic:
ErrorDiffusionDitherer^ ConfigureProcessingDirection(
bool serpentine
)member ConfigureProcessingDirection :
serpentine : bool -> ErrorDiffusionDitherer A typical artifact of error diffusion dithering is a ripple effect, which often appears in homogeneous areas of the dithered image. This is due to the fact that most filters propagate quantization errors mostly to right and down, whereas pixels are processed left-to-right in each line while lines are scanned top-down (raster processing). The ripple effect can be reduced if every second line is processed in the opposite direction (serpentine processing).
The following table demonstrates the effect of different processing directions:
Original image | Quantized image |
|---|---|
|
|
The following example demonstrates how to specify the processing direction for a predefined filter:
// getting a predefined ditherer with serpentine processing:
IDitherer ditherer = ErrorDiffusionDitherer.FloydSteinberg.ConfigureProcessingDirection(serpentine: true);