• Share
    • Twitter
    • LinkedIn
    • Facebook
    • Email
  • Feedback
  • Improve this Doc

Class OctreeQuantizer

Quantize using an Octree.

Inheritance
System.Object
Quantizer
OctreeQuantizer
Inherited Members
Quantizer.Quantize(Image)
Quantizer.FirstPass(BitmapData, Int32, Int32)
Quantizer.SecondPass(BitmapData, Bitmap, Int32, Int32, Rectangle)
Namespace: DotNetNuke.Services.GeneratedImage.ImageQuantization
Assembly: DotNetNuke.dll
Syntax
public class OctreeQuantizer : Quantizer

Constructors

| Improve this Doc View Source

OctreeQuantizer(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 Source

GetPalette(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
Quantizer.GetPalette(ColorPalette)
| Improve this Doc View Source

InitialQuantizePixel(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
Quantizer.InitialQuantizePixel(Quantizer.Color32)
Remarks

This function need only be overridden if your quantize algorithm needs two passes, such as an Octree quantizer.

| Improve this Doc View Source

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.

Overrides
Quantizer.QuantizePixel(Quantizer.Color32)

Extension Methods

JsonExtensionsWeb.ToJson(Object)
  • View Source
Back to top by the community, for the community... #DNNCMS