Class QuantizedPalette
java.lang.Object
org.apache.commons.imaging.palette.QuantizedPalette
- All Implemented Interfaces:
- Palette
- 
Constructor SummaryConstructorsConstructorDescriptionQuantizedPalette(List<org.apache.commons.imaging.palette.ColorSpaceSubset> subsets, int precision) 
- 
Method SummaryModifier 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.
- 
Constructor Details- 
QuantizedPalettepublic QuantizedPalette(List<org.apache.commons.imaging.palette.ColorSpaceSubset> subsets, int precision) 
 
- 
- 
Method Details- 
getEntryDescription copied from interface:PaletteGets the color for a given palette index.
- 
getPaletteIndexDescription copied from interface:PaletteGets the palette index for a given color.- Specified by:
- getPaletteIndexin interface- Palette
- Parameters:
- rgb- the color to look up
- Returns:
- the palette index
- Throws:
- ImagingException- if it fails to read the palette index
 
- 
lengthDescription copied from interface:PaletteGets the number of entries in the palette.
 
-