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, sqr
public OctreeQuantizer(int[] pixels, OctreeQuantizer.Parameters params)
public OctreeQuantizer(int[] pixels)
public void listNodes()
public int[][] getColorMap()
ColorQuantizer
getColorMap
in class ColorQuantizer
protected int findColorIndex(int p)
ColorQuantizer
findColorIndex
in class ColorQuantizer
p
- Original color, encoded as an ARGB integer.Copyright © 2006–2017, Wilhelm Burger, Mark J. Burge (BSD 2-Clause Simplified License)