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
sourceIImageProcessingContextThe current image processing context.
ditherIDitherThe 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
sourceIImageProcessingContextThe current image processing context.
ditherIDitherThe ordered ditherer.
upperColorColorThe color to use for pixels that are above the threshold.
lowerColorColorThe 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
sourceIImageProcessingContextThe current image processing context.
ditherIDitherThe ordered ditherer.
upperColorColorThe color to use for pixels that are above the threshold.
lowerColorColorThe color to use for pixels that are below the threshold
rectangleRectangleThe 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
sourceIImageProcessingContextThe current image processing context.
ditherIDitherThe ordered ditherer.
rectangleRectangleThe Rectangle structure that specifies the portion of the image object to alter.