Class PaletteQuantizer
Allows the quantization of images pixels using color palettes.
Implements
Inherited Members
Namespace: SixLabors.ImageSharp.Processing.Processors.Quantization
Assembly: SixLabors.ImageSharp.dll
Syntax
public class PaletteQuantizer : IQuantizer
Constructors
| Edit this page View SourcePaletteQuantizer(ReadOnlyMemory<Color>)
Initializes a new instance of the PaletteQuantizer class.
Declaration
public PaletteQuantizer(ReadOnlyMemory<Color> palette)
Parameters
Type | Name | Description |
---|---|---|
ReadOnlyMemory<Color> | palette | The color palette. |
PaletteQuantizer(ReadOnlyMemory<Color>, QuantizerOptions)
Initializes a new instance of the PaletteQuantizer class.
Declaration
public PaletteQuantizer(ReadOnlyMemory<Color> palette, QuantizerOptions options)
Parameters
Type | Name | Description |
---|---|---|
ReadOnlyMemory<Color> | palette | The color palette. |
QuantizerOptions | options | The quantizer options defining quantization rules. |
Properties
| Edit this page View SourceOptions
Gets the quantizer options defining quantization rules.
Declaration
public QuantizerOptions Options { get; }
Property Value
Type | Description |
---|---|
QuantizerOptions |
Methods
| Edit this page View SourceCreatePixelSpecificQuantizer<TPixel>(Configuration)
Creates the generic frame quantizer.
Declaration
public IQuantizer<TPixel> CreatePixelSpecificQuantizer<TPixel>(Configuration configuration) where TPixel : unmanaged, IPixel<TPixel>
Parameters
Type | Name | Description |
---|---|---|
Configuration | configuration | The Configuration to configure internal operations. |
Returns
Type | Description |
---|---|
IQuantizer<TPixel> | The IQuantizer<TPixel>. |
Type Parameters
Name | Description |
---|---|
TPixel | The pixel format. |
CreatePixelSpecificQuantizer<TPixel>(Configuration, QuantizerOptions)
Creates the generic frame quantizer.
Declaration
public IQuantizer<TPixel> CreatePixelSpecificQuantizer<TPixel>(Configuration configuration, QuantizerOptions options) where TPixel : unmanaged, IPixel<TPixel>
Parameters
Type | Name | Description |
---|---|---|
Configuration | configuration | The Configuration to configure internal operations. |
QuantizerOptions | options | The options to create the quantizer with. |
Returns
Type | Description |
---|---|
IQuantizer<TPixel> | The IQuantizer<TPixel>. |
Type Parameters
Name | Description |
---|---|
TPixel | The pixel format. |