Quantizerpublic class OctTreeQuantizer extends Object implements Quantizer
| 构造器 | 说明 |
|---|---|
OctTreeQuantizer() |
| 限定符和类型 | 方法 | 说明 |
|---|---|---|
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 在接口中 Quantizerrgb - the colorpublic int[] buildColorTable()
buildColorTable 在接口中 Quantizerpublic void buildColorTable(int[] inPixels,
int[] table)
inPixels - the input colorstable - the output color tableCopyright © 2019. All rights reserved.