Table of Contents

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 IDither

The ordered ditherer.

PaletteDitherProcessor(IDither, ReadOnlyMemory<Color>)

Initializes a new instance of the PaletteDitherProcessor class.

public PaletteDitherProcessor(IDither dither, ReadOnlyMemory<Color> palette)

Parameters

dither IDither

The 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 IDither

The ordered ditherer.

ditherScale float

The 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 IDither

The dithering algorithm.

ditherScale float

The 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

IDither

DitherScale

Gets the dithering scale used to adjust the amount of dither. Range 0..1.

public float DitherScale { get; }

Property Value

float

Palette

Gets the palette to select substitute colors from.

public ReadOnlyMemory<Color> Palette { get; }

Property Value

ReadOnlyMemory<Color>

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 Configuration
source Image<TPixel>
sourceRectangle Rectangle

Returns

IImageProcessor<TPixel>

Type Parameters

TPixel