public final class PDIndexed extends PDSpecialColorSpace
array| Constructor and Description |
|---|
PDIndexed()
Creates a new Indexed color space.
|
PDIndexed(COSArray indexedArray)
Creates a new indexed color space from the given PDF array.
|
PDIndexed(COSArray indexedArray,
PDResources resources)
Creates a new indexed color space from the given PDF array.
|
| Modifier and Type | Method and Description |
|---|---|
PDColorSpace |
getBaseColorSpace()
Returns the base color space.
|
float[] |
getDefaultDecode(int bitsPerComponent)
Returns the default decode array for this color space.
|
PDColor |
getInitialColor()
Returns the initial color value for this color space.
|
String |
getName()
Returns the name of the color space.
|
int |
getNumberOfComponents()
Returns the number of components in this color space
|
void |
setBaseColorSpace(PDColorSpace base)
Sets the base color space.
|
void |
setHighValue(int high)
Sets the highest value that is allowed.
|
BufferedImage |
toRawImage(WritableRaster raster)
Returns the image in this colorspace or null.
|
float[] |
toRGB(float[] value)
Returns the RGB equivalent of the given color value.
|
BufferedImage |
toRGBImage(WritableRaster raster)
Returns the (A)RGB equivalent of the given raster.
|
String |
toString() |
create, create, create, getCOSObject, toRawImage, toRGBImageAWTpublic PDIndexed()
public PDIndexed(COSArray indexedArray) throws IOException
indexedArray - the array containing the indexed parametersIOException - if the colorspace could not be createdpublic PDIndexed(COSArray indexedArray, PDResources resources) throws IOException
indexedArray - the array containing the indexed parametersresources - the resources, can be null. Allows to use its cache for the colorspace.IOException - if the colorspace could not be createdpublic String getName()
PDColorSpacegetName in class PDColorSpacepublic int getNumberOfComponents()
PDColorSpacegetNumberOfComponents in class PDColorSpacepublic float[] getDefaultDecode(int bitsPerComponent)
PDColorSpacegetDefaultDecode in class PDColorSpacebitsPerComponent - the number of bits per component.public PDColor getInitialColor()
PDColorSpacegetInitialColor in class PDColorSpacepublic float[] toRGB(float[] value)
PDColorSpacetoRGB in class PDColorSpacevalue - a color value with component values between 0 and 1public BufferedImage toRGBImage(WritableRaster raster) throws IOException
PDColorSpacetoRGBImage in class PDColorSpaceraster - the source rasterIOException - if the color conversion failspublic BufferedImage toRawImage(WritableRaster raster)
PDColorSpacePDColorSpace.toRGBImage(WritableRaster) if this returns null.toRawImage in class PDColorSpaceraster - the source rasterpublic PDColorSpace getBaseColorSpace()
public void setBaseColorSpace(PDColorSpace base)
base - the base color spacepublic void setHighValue(int high)
high - the highest value for the lookup tableCopyright © 2002–2022 The Apache Software Foundation. All rights reserved.