Class HexadecatreeQuantizer
- Namespace
- SixLabors.ImageSharp.Processing.Processors.Quantization
- Assembly
- SixLabors.ImageSharp.dll
Quantizes images by grouping colors in an adaptive 16-way tree and reducing those groups into a palette.
public class HexadecatreeQuantizer : IQuantizer
- Inheritance
-
HexadecatreeQuantizer
- Implements
- Inherited Members
Remarks
Each level routes colors using one bit of RGB and, when useful, one bit of alpha. Fully opaque mid-tone colors use RGB-only routing so more branch resolution is spent on visible color detail, while transparent, dark, and light colors use alpha-aware routing so opacity changes can form their own palette buckets.
Constructors
HexadecatreeQuantizer()
Initializes a new instance of the HexadecatreeQuantizer class using the default QuantizerOptions.
public HexadecatreeQuantizer()
HexadecatreeQuantizer(QuantizerOptions)
Initializes a new instance of the HexadecatreeQuantizer class.
public HexadecatreeQuantizer(QuantizerOptions options)
Parameters
optionsQuantizerOptionsThe quantizer options that control palette size, dithering, and transparency behavior.
Properties
Options
Gets the quantizer options defining quantization rules.
public QuantizerOptions Options { get; }
Property Value
Methods
CreatePixelSpecificQuantizer<TPixel>(Configuration)
Creates the generic frame quantizer.
public IQuantizer<TPixel> CreatePixelSpecificQuantizer<TPixel>(Configuration configuration) where TPixel : unmanaged, IPixel<TPixel>
Parameters
configurationConfigurationThe Configuration to configure internal operations.
Returns
- IQuantizer<TPixel>
The IQuantizer<TPixel>.
Type Parameters
TPixelThe pixel format.
CreatePixelSpecificQuantizer<TPixel>(Configuration, QuantizerOptions)
Creates the generic frame quantizer.
public IQuantizer<TPixel> CreatePixelSpecificQuantizer<TPixel>(Configuration configuration, QuantizerOptions options) where TPixel : unmanaged, IPixel<TPixel>
Parameters
configurationConfigurationThe Configuration to configure internal operations.
optionsQuantizerOptionsThe options to create the quantizer with.
Returns
- IQuantizer<TPixel>
The IQuantizer<TPixel>.
Type Parameters
TPixelThe pixel format.