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
| Improve this Doc 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
| Improve this Doc View SourceOptions
Gets the quantizer options defining quantization rules.
Declaration
public QuantizerOptions Options { get; }
Property Value
Type | Description |
---|---|
QuantizerOptions |
Methods
| Improve this Doc View SourceCreatePixelSpecificQuantizer<TPixel>(Configuration)
Creates the generic frame quantizer.
Declaration
public IQuantizer<TPixel> CreatePixelSpecificQuantizer<TPixel>(Configuration configuration)
where TPixel : struct, 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 : struct, 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. |