Constructor and Description |
---|
QuantizedPalette(List<org.apache.commons.imaging.palette.ColorSpaceSubset> subsets,
int precision) |
Modifier and Type | Method and Description |
---|---|
int |
getEntry(int index)
Looks up the color for a given palette index.
|
int |
getPaletteIndex(int rgb)
Looks up the palette index for a given color.
|
int |
length()
The number of entries in the palette.
|
public QuantizedPalette(List<org.apache.commons.imaging.palette.ColorSpaceSubset> subsets, int precision)
public int getPaletteIndex(int rgb) throws ImageWriteException
Palette
getPaletteIndex
in interface Palette
rgb
- the color to look upImageWriteException
- if it fails to read the palette indexpublic int getEntry(int index)
Palette
Copyright © 2007–2020 The Apache Software Foundation. All rights reserved.