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
| Improve this Doc 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 image this method extends. |
Returns
Type | Description |
---|---|
IImageProcessingContext | The IImageProcessingContext to allow chaining of operations. |
Dither(IImageProcessingContext, IDither)
Dithers the image reducing it to a web-safe palette using ordered dithering.
Declaration
public static IImageProcessingContext Dither(this IImageProcessingContext source, IDither dither)
Parameters
Type | Name | Description |
---|---|---|
IImageProcessingContext | source | The image this method extends. |
IDither | dither | The ordered ditherer. |
Returns
Type | Description |
---|---|
IImageProcessingContext | The IImageProcessingContext to allow chaining of operations. |
Dither(IImageProcessingContext, IDither, Rectangle)
Dithers the image reducing it to a web-safe palette using ordered dithering.
Declaration
public static IImageProcessingContext Dither(this IImageProcessingContext source, IDither dither, Rectangle rectangle)
Parameters
Type | Name | Description |
---|---|---|
IImageProcessingContext | source | The image this method extends. |
IDither | dither | The ordered ditherer. |
Rectangle | rectangle | The Rectangle structure that specifies the portion of the image object to alter. |
Returns
Type | Description |
---|---|
IImageProcessingContext | The IImageProcessingContext to allow chaining of operations. |
Dither(IImageProcessingContext, IDither, ReadOnlyMemory<Color>)
Dithers the image reducing it to the given palette using ordered dithering.
Declaration
public static IImageProcessingContext Dither(this IImageProcessingContext source, IDither dither, ReadOnlyMemory<Color> palette)
Parameters
Type | Name | Description |
---|---|---|
IImageProcessingContext | source | The image this method extends. |
IDither | dither | The ordered ditherer. |
ReadOnlyMemory<Color> | palette | The palette to select substitute colors from. |
Returns
Type | Description |
---|---|
IImageProcessingContext | The IImageProcessingContext to allow chaining of operations. |
Dither(IImageProcessingContext, IDither, ReadOnlyMemory<Color>, Rectangle)
Dithers the image reducing it to the given palette using ordered dithering.
Declaration
public static IImageProcessingContext Dither(this IImageProcessingContext source, IDither dither, ReadOnlyMemory<Color> palette, Rectangle rectangle)
Parameters
Type | Name | Description |
---|---|---|
IImageProcessingContext | source | The image this method extends. |
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 | The IImageProcessingContext to allow chaining of operations. |
Dither(IImageProcessingContext, IDither, Single)
Dithers the image reducing it to a web-safe palette using ordered dithering.
Declaration
public static IImageProcessingContext Dither(this IImageProcessingContext source, IDither dither, float ditherScale)
Parameters
Type | Name | Description |
---|---|---|
IImageProcessingContext | source | The image this method extends. |
IDither | dither | The ordered ditherer. |
Single | ditherScale | The dithering scale used to adjust the amount of dither. |
Returns
Type | Description |
---|---|
IImageProcessingContext | The IImageProcessingContext to allow chaining of operations. |
Dither(IImageProcessingContext, IDither, Single, Rectangle)
Dithers the image reducing it to a web-safe palette using ordered dithering.
Declaration
public static IImageProcessingContext Dither(this IImageProcessingContext source, IDither dither, float ditherScale, Rectangle rectangle)
Parameters
Type | Name | Description |
---|---|---|
IImageProcessingContext | source | The image this method extends. |
IDither | dither | The ordered ditherer. |
Single | 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 | The IImageProcessingContext to allow chaining of operations. |
Dither(IImageProcessingContext, IDither, Single, ReadOnlyMemory<Color>)
Dithers the image reducing it to the given palette using ordered dithering.
Declaration
public static IImageProcessingContext Dither(this IImageProcessingContext source, IDither dither, float ditherScale, ReadOnlyMemory<Color> palette)
Parameters
Type | Name | Description |
---|---|---|
IImageProcessingContext | source | The image this method extends. |
IDither | dither | The ordered ditherer. |
Single | 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 | The IImageProcessingContext to allow chaining of operations. |
Dither(IImageProcessingContext, IDither, Single, ReadOnlyMemory<Color>, Rectangle)
Dithers the image reducing it to the given palette using ordered dithering.
Declaration
public static IImageProcessingContext Dither(this IImageProcessingContext source, IDither dither, float ditherScale, ReadOnlyMemory<Color> palette, Rectangle rectangle)
Parameters
Type | Name | Description |
---|---|---|
IImageProcessingContext | source | The image this method extends. |
IDither | dither | The ordered ditherer. |
Single | 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 | The IImageProcessingContext to allow chaining of operations. |
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 image this method extends. |
Rectangle | rectangle | The Rectangle structure that specifies the portion of the image object to alter. |
Returns
Type | Description |
---|---|
IImageProcessingContext | The IImageProcessingContext to allow chaining of operations. |