Class PaletteQuantizer
Summary description for PaletteQuantizer.
Inherited Members
Namespace: DotNetNuke.Services.GeneratedImage.ImageQuantization
Assembly: DotNetNuke.dll
Syntax
public class PaletteQuantizer : Quantizer
Constructors
| Improve this Doc View SourcePaletteQuantizer(ArrayList)
Initializes a new instance of the PaletteQuantizer class. Construct the palette quantizer.
Declaration
public PaletteQuantizer(ArrayList palette)
Parameters
| Type | Name | Description |
|---|---|---|
| ArrayList | palette | The color palette to quantize to. |
Remarks
Palette quantization only requires a single quantization step.
Fields
| Improve this Doc View Source_colors
List of all colors in the palette.
Declaration
protected Color[] _colors
Field Value
| Type | Description |
|---|---|
| Color[] |
Methods
| Improve this Doc View SourceGetPalette(ColorPalette)
Retrieve the palette for the quantized image.
Declaration
protected override ColorPalette GetPalette(ColorPalette palette)
Parameters
| Type | Name | Description |
|---|---|---|
| ColorPalette | palette | Any old palette, this is overrwritten. |
Returns
| Type | Description |
|---|---|
| ColorPalette | The new color palette. |
Overrides
| Improve this Doc View SourceQuantizePixel(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. |