public class MappedColorIndexer extends Object implements ColorIndexer
Constructor and Description |
---|
MappedColorIndexer(byte[][] colors,
ColorMap colorMap,
int shift)
Builds a new
MappedColorIndexer |
Modifier and Type | Method and Description |
---|---|
int |
getClosestIndex(int r,
int g,
int b,
int a) |
IndexColorModel |
toIndexColorModel() |
public MappedColorIndexer(byte[][] colors, ColorMap colorMap, int shift)
MappedColorIndexer
colors
- The target palettecolorMap
- The color map used to build the palette, mapping from shifted colors to the palette indexshift
- The bit shift applied while building the palettepublic IndexColorModel toIndexColorModel()
toIndexColorModel
in interface ColorIndexer
public int getClosestIndex(int r, int g, int b, int a)
getClosestIndex
in interface ColorIndexer
Copyright © 2006–2015 GeoSolutions. All rights reserved.