public class OctreeQuantizer extends ColorQuantizer
| Modifier and Type | Class and Description |
|---|---|
static class |
OctreeQuantizer.Parameters |
MAX_RGB| Constructor and Description |
|---|
OctreeQuantizer(int[] pixels) |
OctreeQuantizer(int[] pixels,
OctreeQuantizer.Parameters params) |
| Modifier and Type | Method and Description |
|---|---|
protected int |
findColorIndex(int p)
Finds the color table index of the color that is "closest" to the supplied
RGB color (minimum Euclidean distance in color space).
|
int[][] |
getColorMap()
Retrieves the color map produced by this color quantizer.
|
void |
listNodes()
Lists the octree nodes to System.out (intended for debugging only).
|
intToRgb, listColorMap, log2, quantize, quantize, quantize, rgbToInt, sqrpublic OctreeQuantizer(int[] pixels, OctreeQuantizer.Parameters params)
public OctreeQuantizer(int[] pixels)
public void listNodes()
public int[][] getColorMap()
ColorQuantizergetColorMap in class ColorQuantizerprotected int findColorIndex(int p)
ColorQuantizerfindColorIndex in class ColorQuantizerp - Original color, encoded as an ARGB integer.Copyright © 2006–2017, Wilhelm Burger, Mark J. Burge (BSD 2-Clause Simplified License)