Class DitherExtensions
- Namespace
- SixLabors.ImageSharp.Processing
- Assembly
- SixLabors.ImageSharp.dll
Defines dithering extensions to apply on an Image using Mutate/Clone.
public static class DitherExtensions
- Inheritance
-
DitherExtensions
- Inherited Members
Methods
Dither(IImageProcessingContext)
Dithers the image reducing it to a web-safe palette using Bayer8x8.
public static IImageProcessingContext Dither(this IImageProcessingContext source)
Parameters
sourceIImageProcessingContextThe current image processing context.
Returns
Dither(IImageProcessingContext, IDither)
Dithers the image reducing it to a web-safe palette.
public static IImageProcessingContext Dither(this IImageProcessingContext source, IDither dither)
Parameters
sourceIImageProcessingContextThe current image processing context.
ditherIDitherThe ordered ditherer.
Returns
Dither(IImageProcessingContext, IDither, Rectangle)
Dithers the image reducing it to a web-safe palette.
public static IImageProcessingContext Dither(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.
Returns
Dither(IImageProcessingContext, IDither, ReadOnlyMemory<Color>)
Dithers the image reducing it to the given palette.
public static IImageProcessingContext Dither(this IImageProcessingContext source, IDither dither, ReadOnlyMemory<Color> palette)
Parameters
sourceIImageProcessingContextThe current image processing context.
ditherIDitherThe ordered ditherer.
paletteReadOnlyMemory<Color>The palette to select substitute colors from.
Returns
Dither(IImageProcessingContext, IDither, ReadOnlyMemory<Color>, Rectangle)
Dithers the image reducing it to the given palette.
public static IImageProcessingContext Dither(this IImageProcessingContext source, IDither dither, ReadOnlyMemory<Color> palette, Rectangle rectangle)
Parameters
sourceIImageProcessingContextThe current image processing context.
ditherIDitherThe ordered ditherer.
paletteReadOnlyMemory<Color>The palette to select substitute colors from.
rectangleRectangleThe Rectangle structure that specifies the portion of the image object to alter.
Returns
Dither(IImageProcessingContext, IDither, float)
Dithers the image reducing it to a web-safe palette.
public static IImageProcessingContext Dither(this IImageProcessingContext source, IDither dither, float ditherScale)
Parameters
sourceIImageProcessingContextThe current image processing context.
ditherIDitherThe ordered ditherer.
ditherScalefloatThe dithering scale used to adjust the amount of dither.
Returns
Dither(IImageProcessingContext, IDither, float, Rectangle)
Dithers the image reducing it to a web-safe palette.
public static IImageProcessingContext Dither(this IImageProcessingContext source, IDither dither, float ditherScale, Rectangle rectangle)
Parameters
sourceIImageProcessingContextThe current image processing context.
ditherIDitherThe ordered ditherer.
ditherScalefloatThe dithering scale used to adjust the amount of dither.
rectangleRectangleThe Rectangle structure that specifies the portion of the image object to alter.
Returns
Dither(IImageProcessingContext, IDither, float, ReadOnlyMemory<Color>)
Dithers the image reducing it to the given palette.
public static IImageProcessingContext Dither(this IImageProcessingContext source, IDither dither, float ditherScale, ReadOnlyMemory<Color> palette)
Parameters
sourceIImageProcessingContextThe current image processing context.
ditherIDitherThe ordered ditherer.
ditherScalefloatThe dithering scale used to adjust the amount of dither.
paletteReadOnlyMemory<Color>The palette to select substitute colors from.
Returns
Dither(IImageProcessingContext, IDither, float, ReadOnlyMemory<Color>, Rectangle)
Dithers the image reducing it to the given palette.
public static IImageProcessingContext Dither(this IImageProcessingContext source, IDither dither, float ditherScale, ReadOnlyMemory<Color> palette, Rectangle rectangle)
Parameters
sourceIImageProcessingContextThe current image processing context.
ditherIDitherThe ordered ditherer.
ditherScalefloatThe dithering scale used to adjust the amount of dither.
paletteReadOnlyMemory<Color>The palette to select substitute colors from.
rectangleRectangleThe Rectangle structure that specifies the portion of the image object to alter.
Returns
Dither(IImageProcessingContext, Rectangle)
Dithers the image reducing it to a web-safe palette using Bayer8x8.
public static IImageProcessingContext Dither(this IImageProcessingContext source, Rectangle rectangle)
Parameters
sourceIImageProcessingContextThe current image processing context.
rectangleRectangleThe Rectangle structure that specifies the portion of the image object to alter.