public interface Quantizer
Modifier and Type | Method and Description |
---|---|
void |
addPixels(int[] pixels,
int offset,
int count)
Add pixels to the quantizer.
|
int[] |
buildColorTable()
Build a color table from the added pixels.
|
int |
getIndexForColor(int rgb)
Using the previously-built color table, return the index into that table for a pixel.
|
void |
setup(int numColors)
Initialize the quantizer.
|
void setup(int numColors)
numColors
- the number of colors we're quantizing to.void addPixels(int[] pixels, int offset, int count)
pixels
- the array of ARGB pixelsoffset
- the offset into the arraycount
- the count of pixelsint[] buildColorTable()
int getIndexForColor(int rgb)
rgb
- the pixel to find