Class PaletteDitherProcessor
Allows the consumption a palette to dither an image.
Implements
Inherited Members
Namespace: SixLabors.ImageSharp.Processing.Processors.Dithering
Assembly: SixLabors.ImageSharp.dll
Syntax
public sealed class PaletteDitherProcessor : IImageProcessor
Constructors
| Edit this page View SourcePaletteDitherProcessor(IDither)
Initializes a new instance of the PaletteDitherProcessor class.
Declaration
public PaletteDitherProcessor(IDither dither)
Parameters
| Type | Name | Description |
|---|---|---|
| IDither | dither | The ordered ditherer. |
PaletteDitherProcessor(IDither, ReadOnlyMemory<Color>)
Initializes a new instance of the PaletteDitherProcessor class.
Declaration
public PaletteDitherProcessor(IDither dither, ReadOnlyMemory<Color> palette)
Parameters
| Type | Name | Description |
|---|---|---|
| IDither | dither | The dithering algorithm. |
| ReadOnlyMemory<Color> | palette | The palette to select substitute colors from. |
PaletteDitherProcessor(IDither, float)
Initializes a new instance of the PaletteDitherProcessor class.
Declaration
public PaletteDitherProcessor(IDither dither, float ditherScale)
Parameters
| Type | Name | Description |
|---|---|---|
| IDither | dither | The ordered ditherer. |
| float | ditherScale | The dithering scale used to adjust the amount of dither. |
PaletteDitherProcessor(IDither, float, ReadOnlyMemory<Color>)
Initializes a new instance of the PaletteDitherProcessor class.
Declaration
public PaletteDitherProcessor(IDither dither, float ditherScale, ReadOnlyMemory<Color> palette)
Parameters
| Type | Name | Description |
|---|---|---|
| IDither | dither | The dithering algorithm. |
| float | ditherScale | The dithering scale used to adjust the amount of dither. |
| ReadOnlyMemory<Color> | palette | The palette to select substitute colors from. |
Properties
| Edit this page View SourceDither
Gets the dithering algorithm to apply to the output image.
Declaration
public IDither Dither { get; }
Property Value
| Type | Description |
|---|---|
| IDither |
DitherScale
Gets the dithering scale used to adjust the amount of dither. Range 0..1.
Declaration
public float DitherScale { get; }
Property Value
| Type | Description |
|---|---|
| float |
Palette
Gets the palette to select substitute colors from.
Declaration
public ReadOnlyMemory<Color> Palette { get; }
Property Value
| Type | Description |
|---|---|
| ReadOnlyMemory<Color> |
Methods
| Edit this page View SourceCreatePixelSpecificProcessor<TPixel>(Configuration, Image<TPixel>, Rectangle)
Creates a pixel specific IImageProcessor<TPixel> that is capable of executing the processing algorithm on an Image<TPixel>.
Declaration
public IImageProcessor<TPixel> CreatePixelSpecificProcessor<TPixel>(Configuration configuration, Image<TPixel> source, Rectangle sourceRectangle) where TPixel : unmanaged, IPixel<TPixel>
Parameters
| Type | Name | Description |
|---|---|---|
| Configuration | configuration | The configuration which allows altering default behaviour or extending the library. |
| Image<TPixel> | source | The source image. Cannot be null. |
| Rectangle | sourceRectangle | The Rectangle structure that specifies the portion of the image object to draw. |
Returns
| Type | Description |
|---|---|
| IImageProcessor<TPixel> |
Type Parameters
| Name | Description |
|---|---|
| TPixel | The pixel type. |