C# Class ImageProcessor.Imaging.Quantizers.WuQuantizer.PaletteLookup

Stores the indexed color palette of an image for fast access. Adapted from
ファイルを表示 Open project: JimBobSquarePants/ImageProcessor Class Usage Examples

Private Properties

Property Type Description
BuildLookup void
ComputeBitMask byte
GetMask int
HighestSetBitIndex byte

Public Methods

Method Description
GetPaletteIndex ( ImageProcessor.Imaging.Colors.Color32 pixel ) : byte

Gets palette index for the given pixel.

PaletteLookup ( ImageProcessor.Imaging.Colors.Color32 palette ) : System

Initializes a new instance of the PaletteLookup class.

Private Methods

Method Description
BuildLookup ( ImageProcessor.Imaging.Colors.Color32 palette ) : void

The build lookup.

ComputeBitMask ( byte max, int bits ) : byte

Computes the bit mask.

GetMask ( ImageProcessor.Imaging.Colors.Color32 palette ) : int

Gets the mask value from the palette.

HighestSetBitIndex ( byte value ) : byte

Gets the highest set bit index.

Method Details

GetPaletteIndex() public method

Gets palette index for the given pixel.
public GetPaletteIndex ( ImageProcessor.Imaging.Colors.Color32 pixel ) : byte
pixel ImageProcessor.Imaging.Colors.Color32 /// The pixel to return the index for. ///
return byte

PaletteLookup() public method

Initializes a new instance of the PaletteLookup class.
public PaletteLookup ( ImageProcessor.Imaging.Colors.Color32 palette ) : System
palette ImageProcessor.Imaging.Colors.Color32 /// The palette. ///
return System