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 OctTreeQuantizer()
public void setup(int numColors)
public void addPixels(int[] pixels, int offset, int count)
public int getIndexForColor(int rgb)
getIndexForColor in interface Quantizerrgb - the colorpublic int[] buildColorTable()
buildColorTable in interface Quantizerpublic void buildColorTable(int[] inPixels, int[] table)
inPixels - the input colorstable - the output color table