Class BinaryDitherExtensions
Defines extensions to apply binary dithering on an Image using Mutate/Clone.
Inherited Members
Namespace: SixLabors.ImageSharp.Processing
Assembly: SixLabors.ImageSharp.dll
Syntax
public static class BinaryDitherExtensions
Methods
| Edit this page View SourceBinaryDither(IImageProcessingContext, IDither)
Dithers the image reducing it to two colors using ordered dithering.
Declaration
public static IImageProcessingContext BinaryDither(this IImageProcessingContext source, IDither dither)
Parameters
Type | Name | Description |
---|---|---|
IImageProcessingContext | source | The current image processing context. |
IDither | dither | The ordered ditherer. |
Returns
Type | Description |
---|---|
IImageProcessingContext |
BinaryDither(IImageProcessingContext, IDither, Color, Color)
Dithers the image reducing it to two colors using ordered dithering.
Declaration
public static IImageProcessingContext BinaryDither(this IImageProcessingContext source, IDither dither, Color upperColor, Color lowerColor)
Parameters
Type | Name | Description |
---|---|---|
IImageProcessingContext | source | The current image processing context. |
IDither | dither | The ordered ditherer. |
Color | upperColor | The color to use for pixels that are above the threshold. |
Color | lowerColor | The color to use for pixels that are below the threshold |
Returns
Type | Description |
---|---|
IImageProcessingContext |
BinaryDither(IImageProcessingContext, IDither, Color, Color, Rectangle)
Dithers the image reducing it to two colors using ordered dithering.
Declaration
public static IImageProcessingContext BinaryDither(this IImageProcessingContext source, IDither dither, Color upperColor, Color lowerColor, Rectangle rectangle)
Parameters
Type | Name | Description |
---|---|---|
IImageProcessingContext | source | The current image processing context. |
IDither | dither | The ordered ditherer. |
Color | upperColor | The color to use for pixels that are above the threshold. |
Color | lowerColor | 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
Type | Description |
---|---|
IImageProcessingContext |
BinaryDither(IImageProcessingContext, IDither, Rectangle)
Dithers the image reducing it to two colors using ordered dithering.
Declaration
public static IImageProcessingContext BinaryDither(this IImageProcessingContext source, IDither dither, Rectangle rectangle)
Parameters
Type | Name | Description |
---|---|---|
IImageProcessingContext | source | The current image processing context. |
IDither | dither | The ordered ditherer. |
Rectangle | rectangle | The Rectangle structure that specifies the portion of the image object to alter. |
Returns
Type | Description |
---|---|
IImageProcessingContext |