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