Table of Contents

Class BinaryDitherExtensions

Namespace
SixLabors.ImageSharp.Processing
Assembly
SixLabors.ImageSharp.dll

Defines extensions to apply binary dithering on an Image using Mutate/Clone.

public static class BinaryDitherExtensions
Inheritance
BinaryDitherExtensions
Inherited Members

Methods

BinaryDither(IImageProcessingContext, IDither)

Dithers the image reducing it to two colors using ordered dithering.

public static IImageProcessingContext BinaryDither(this IImageProcessingContext source, IDither dither)

Parameters

source IImageProcessingContext

The current image processing context.

dither IDither

The ordered ditherer.

Returns

IImageProcessingContext

The IImageProcessingContext.

BinaryDither(IImageProcessingContext, IDither, Color, Color)

Dithers the image reducing it to two colors using ordered dithering.

public static IImageProcessingContext BinaryDither(this IImageProcessingContext source, IDither dither, Color upperColor, Color lowerColor)

Parameters

source IImageProcessingContext

The current image processing context.

dither IDither

The ordered ditherer.

upperColor Color

The color to use for pixels that are above the threshold.

lowerColor Color

The color to use for pixels that are below the threshold

Returns

IImageProcessingContext

The IImageProcessingContext.

BinaryDither(IImageProcessingContext, IDither, Color, Color, Rectangle)

Dithers the image reducing it to two colors using ordered dithering.

public static IImageProcessingContext BinaryDither(this IImageProcessingContext source, IDither dither, Color upperColor, Color lowerColor, Rectangle rectangle)

Parameters

source IImageProcessingContext

The current image processing context.

dither IDither

The ordered ditherer.

upperColor Color

The color to use for pixels that are above the threshold.

lowerColor Color

The color to use for pixels that are below the threshold

rectangle Rectangle

The Rectangle structure that specifies the portion of the image object to alter.

Returns

IImageProcessingContext

The IImageProcessingContext.

BinaryDither(IImageProcessingContext, IDither, Rectangle)

Dithers the image reducing it to two colors using ordered dithering.

public static IImageProcessingContext BinaryDither(this IImageProcessingContext source, IDither dither, Rectangle rectangle)

Parameters

source IImageProcessingContext

The current image processing context.

dither IDither

The ordered ditherer.

rectangle Rectangle

The Rectangle structure that specifies the portion of the image object to alter.

Returns

IImageProcessingContext

The IImageProcessingContext.