Struct OctreeQuantizer<TPixel>
- Namespace
- SixLabors.ImageSharp.Processing.Processors.Quantization
- Assembly
- SixLabors.ImageSharp.dll
Encapsulates methods to calculate the color palette if an image using an Octree pattern. http://msdn.microsoft.com/en-us/library/aa479306.aspx
public struct OctreeQuantizer<TPixel> : IQuantizer<TPixel>, IDisposable where TPixel : unmanaged, IPixel<TPixel>
Type Parameters
TPixelThe pixel format.
- Implements
-
IQuantizer<TPixel>
- Inherited Members
- Extension Methods
Constructors
OctreeQuantizer(Configuration, QuantizerOptions)
Initializes a new instance of the OctreeQuantizer<TPixel> struct.
public OctreeQuantizer(Configuration configuration, QuantizerOptions options)
Parameters
configurationConfigurationThe configuration which allows altering default behaviour or extending the library.
optionsQuantizerOptionsThe quantizer options defining quantization rules.
Properties
Configuration
public readonly Configuration Configuration { get; }
Property Value
Options
public readonly QuantizerOptions Options { get; }
Property Value
Palette
public readonly ReadOnlyMemory<TPixel> Palette { get; }
Property Value
- ReadOnlyMemory<TPixel>
Methods
AddPaletteColors(Buffer2DRegion<TPixel>)
public void AddPaletteColors(Buffer2DRegion<TPixel> pixelRegion)
Parameters
pixelRegionBuffer2DRegion<TPixel>
Dispose()
public void Dispose()
GetQuantizedColor(TPixel, out TPixel)
public readonly byte GetQuantizedColor(TPixel color, out TPixel match)
Parameters
colorTPixelmatchTPixel
Returns
QuantizeFrame(ImageFrame<TPixel>, Rectangle)
public readonly IndexedImageFrame<TPixel> QuantizeFrame(ImageFrame<TPixel> source, Rectangle bounds)
Parameters
sourceImageFrame<TPixel>boundsRectangle
Returns
- IndexedImageFrame<TPixel>