Class QuantizedPalette
java.lang.Object
org.apache.commons.imaging.palette.QuantizedPalette
- All Implemented Interfaces:
Palette
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final intprivate final ColorSpaceSubset[]private final List<ColorSpaceSubset> -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionintgetEntry(int index) Gets the color for a given palette index.intgetPaletteIndex(int rgb) Gets the palette index for a given color.intlength()Gets the number of entries in the palette.
-
Field Details
-
precision
private final int precision -
subsets
-
straight
-
-
Constructor Details
-
QuantizedPalette
-
-
Method Details
-
getEntry
-
getPaletteIndex
Description copied from interface:PaletteGets the palette index for a given color.- Specified by:
getPaletteIndexin interfacePalette- Parameters:
rgb- the color to look up- Returns:
- the palette index
- Throws:
ImagingException- if it fails to read the palette index
-
length
-