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 BinaryDitherExtensionsMethods
| Improve this Doc 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 image this method extends. | 
| IDither | dither | The ordered ditherer. | 
Returns
| Type | Description | 
|---|---|
| IImageProcessingContext | The IImageProcessingContext to allow chaining of operations. | 
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 image this method extends. | 
| 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 | The IImageProcessingContext to allow chaining of operations. | 
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 image this method extends. | 
| 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 | The IImageProcessingContext to allow chaining of operations. | 
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 image this method extends. | 
| IDither | dither | The ordered ditherer. | 
| Rectangle | rectangle | The Rectangle structure that specifies the portion of the image object to alter. | 
Returns
| Type | Description | 
|---|---|
| IImageProcessingContext | The IImageProcessingContext to allow chaining of operations. |