Class PaletteDitherProcessor
- Namespace
- SixLabors.ImageSharp.Processing.Processors.Dithering
- Assembly
- SixLabors.ImageSharp.dll
Allows the consumption a palette to dither an image.
public sealed class PaletteDitherProcessor : IImageProcessor
- Inheritance
-
PaletteDitherProcessor
- Implements
- Inherited Members
Constructors
PaletteDitherProcessor(IDither)
Initializes a new instance of the PaletteDitherProcessor class.
public PaletteDitherProcessor(IDither dither)
Parameters
dither
IDitherThe ordered ditherer.
PaletteDitherProcessor(IDither, ReadOnlyMemory<Color>)
Initializes a new instance of the PaletteDitherProcessor class.
public PaletteDitherProcessor(IDither dither, ReadOnlyMemory<Color> palette)
Parameters
dither
IDitherThe dithering algorithm.
palette
ReadOnlyMemory<Color>The palette to select substitute colors from.
PaletteDitherProcessor(IDither, float)
Initializes a new instance of the PaletteDitherProcessor class.
public PaletteDitherProcessor(IDither dither, float ditherScale)
Parameters
dither
IDitherThe ordered ditherer.
ditherScale
floatThe dithering scale used to adjust the amount of dither.
PaletteDitherProcessor(IDither, float, ReadOnlyMemory<Color>)
Initializes a new instance of the PaletteDitherProcessor class.
public PaletteDitherProcessor(IDither dither, float ditherScale, ReadOnlyMemory<Color> palette)
Parameters
dither
IDitherThe dithering algorithm.
ditherScale
floatThe dithering scale used to adjust the amount of dither.
palette
ReadOnlyMemory<Color>The palette to select substitute colors from.
Properties
Dither
Gets the dithering algorithm to apply to the output image.
public IDither Dither { get; }
Property Value
DitherScale
Gets the dithering scale used to adjust the amount of dither. Range 0..1.
public float DitherScale { get; }
Property Value
Palette
Gets the palette to select substitute colors from.
public ReadOnlyMemory<Color> Palette { get; }
Property Value
Methods
CreatePixelSpecificProcessor<TPixel>(Configuration, Image<TPixel>, Rectangle)
public IImageProcessor<TPixel> CreatePixelSpecificProcessor<TPixel>(Configuration configuration, Image<TPixel> source, Rectangle sourceRectangle) where TPixel : unmanaged, IPixel<TPixel>
Parameters
configuration
Configurationsource
Image<TPixel>sourceRectangle
Rectangle
Returns
- IImageProcessor<TPixel>
Type Parameters
TPixel