Class OctreeQuantizer
Quantize using an Octree.
Inherited Members
Namespace: DotNetNuke.Services.GeneratedImage.ImageQuantization
Assembly: DotNetNuke.dll
Syntax
public class OctreeQuantizer : Quantizer
Constructors
| Improve this Doc View SourceOctreeQuantizer(Int32, Int32)
Initializes a new instance of the OctreeQuantizer class.
Declaration
public OctreeQuantizer(int maxColors, int maxColorBits)
Parameters
| Type | Name | Description |
|---|---|---|
| System.Int32 | maxColors | The maximum number of colors to return. |
| System.Int32 | maxColorBits | The number of significant bits. |
Remarks
The Octree quantizer is a two pass algorithm. The initial pass sets up the octree, the second pass quantizes a color based on the nodes in the tree.
Methods
| Improve this Doc View SourceGetPalette(ColorPalette)
Retrieve the palette for the quantized image.
Declaration
protected override ColorPalette GetPalette(ColorPalette original)
Parameters
| Type | Name | Description |
|---|---|---|
| ColorPalette | original | Any old palette, this is overrwritten. |
Returns
| Type | Description |
|---|---|
| ColorPalette | The new color palette. |
Overrides
| Improve this Doc View SourceInitialQuantizePixel(Quantizer.Color32)
Override this to process the pixel in the first pass of the algorithm.
Declaration
protected override void InitialQuantizePixel(Quantizer.Color32 pixel)
Parameters
| Type | Name | Description |
|---|---|---|
| Quantizer.Color32 | pixel | The pixel to quantize. |
Overrides
Remarks
This function need only be overridden if your quantize algorithm needs two passes, such as an Octree quantizer.
QuantizePixel(Quantizer.Color32)
Override this to process the pixel in the second pass of the algorithm.
Declaration
protected override byte QuantizePixel(Quantizer.Color32 pixel)
Parameters
| Type | Name | Description |
|---|---|---|
| Quantizer.Color32 | pixel | The pixel to quantize. |
Returns
| Type | Description |
|---|---|
| System.Byte | The quantized value. |