public class OctTreeQuantizer extends Object implements Quantizer
Constructor and Description |
---|
OctTreeQuantizer() |
Modifier and Type | Method and Description |
---|---|
void |
addPixels(int[] pixels,
int offset,
int count)
Add pixels to the quantizer.
|
int[] |
buildColorTable()
Build the color table.
|
void |
buildColorTable(int[] inPixels,
int[] table)
A quick way to use the quantizer.
|
int |
getIndexForColor(int rgb)
Get the color table index for a color.
|
void |
setup(int numColors)
Initialize the quantizer.
|
public void setup(int numColors)
public void addPixels(int[] pixels, int offset, int count)
public int getIndexForColor(int rgb)
getIndexForColor
in interface Quantizer
rgb
- the colorpublic int[] buildColorTable()
buildColorTable
in interface Quantizer
public void buildColorTable(int[] inPixels, int[] table)
inPixels
- the input colorstable
- the output color tableCopyright © 2012-2013 Bambi Software Foundation. All Rights Reserved.