IndexedColorSpace
Overview
IndexedColorSpace is a class in Aspose.PDF FOSS for Java.
Inherits from: ColorSpaceBase.
Indexed color space (ISO 32000-1:2008, §8.6.6.3).
This class provides 9 methods for working with IndexedColorSpace objects in Java programs.
Available methods include: IndexedColorSpace, fromArray, getBase, getHival, getName, getNumberOfComponents, lookupColor, resolve, toRGBInt.
All public members are accessible to any Java application after installing the Aspose.PDF FOSS for Java package.
Properties: base, hival, name, numberOfComponents.
Properties
| Name | Type | Access | Description |
|---|---|---|---|
name | String | Read | Gets the name. |
numberOfComponents | int | Read | Gets the number of components. |
base | ColorSpaceBase | Read | Returns the base color space. |
hival | int | Read | Returns the maximum valid index. |
Methods
| Signature | Description |
|---|---|
IndexedColorSpace(base: ColorSpaceBase, hival: int, lookupTable: byte[]) | Creates an IndexedColorSpace. |
fromArray(arr: PdfArray, resources: Resources, parser: PDFParser) → IndexedColorSpace | Creates an IndexedColorSpace from a PdfArray: [/Indexed base hival lookup]. |
getName() → String | Returns the name. |
getNumberOfComponents() → int | Returns the number of components. |
getBase() → ColorSpaceBase | Returns the base color space. |
getHival() → int | Returns the maximum valid index. |
lookupColor(index: int) → double[] | Looks up a palette entry, returning the base color space components. |
toRGBInt(comps: double[]) → int | Palette index -> base components -> base space’s RGB. |
resolve(csObj: PdfBase, resources: Resources, parser: PDFParser) → ColorSpaceBase |