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

Class PaletteQuantizer

Summary description for PaletteQuantizer.

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

Constructors

| Improve this Doc View Source

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

GetPalette(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
Quantizer.GetPalette(ColorPalette)
| 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