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
source
IImageProcessingContextThe 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
source
IImageProcessingContextThe current image processing context.
dither
IDitherThe 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
source
IImageProcessingContextThe current image processing context.
dither
IDitherThe ordered ditherer.
rectangle
RectangleThe 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
source
IImageProcessingContextThe current image processing context.
dither
IDitherThe ordered ditherer.
palette
ReadOnlyMemory<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
source
IImageProcessingContextThe current image processing context.
dither
IDitherThe ordered ditherer.
palette
ReadOnlyMemory<Color>The palette to select substitute colors from.
rectangle
RectangleThe 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
source
IImageProcessingContextThe current image processing context.
dither
IDitherThe ordered ditherer.
ditherScale
floatThe 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
source
IImageProcessingContextThe current image processing context.
dither
IDitherThe ordered ditherer.
ditherScale
floatThe dithering scale used to adjust the amount of dither.
rectangle
RectangleThe 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
source
IImageProcessingContextThe current image processing context.
dither
IDitherThe ordered ditherer.
ditherScale
floatThe dithering scale used to adjust the amount of dither.
palette
ReadOnlyMemory<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
source
IImageProcessingContextThe current image processing context.
dither
IDitherThe ordered ditherer.
ditherScale
floatThe dithering scale used to adjust the amount of dither.
palette
ReadOnlyMemory<Color>The palette to select substitute colors from.
rectangle
RectangleThe 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
source
IImageProcessingContextThe current image processing context.
rectangle
RectangleThe Rectangle structure that specifies the portion of the image object to alter.