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
IImageProcessingContextThe current image processing context.
dither
IDitherThe ordered ditherer.
Returns
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
IImageProcessingContextThe current image processing context.
dither
IDitherThe ordered ditherer.
upperColor
ColorThe color to use for pixels that are above the threshold.
lowerColor
ColorThe color to use for pixels that are below the threshold
Returns
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
IImageProcessingContextThe current image processing context.
dither
IDitherThe ordered ditherer.
upperColor
ColorThe color to use for pixels that are above the threshold.
lowerColor
ColorThe color to use for pixels that are below the threshold
rectangle
RectangleThe Rectangle structure that specifies the portion of the image object to alter.
Returns
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
IImageProcessingContextThe current image processing context.
dither
IDitherThe ordered ditherer.
rectangle
RectangleThe Rectangle structure that specifies the portion of the image object to alter.