public class PDDeviceCMYK extends PDDeviceColorSpace
| Modifier and Type | Field and Description |
|---|---|
static PDDeviceCMYK |
INSTANCE
The single instance of this class.
|
array| Modifier | Constructor and Description |
|---|---|
protected |
PDDeviceCMYK() |
| Modifier and Type | Method and Description |
|---|---|
float[] |
getDefaultDecode(int bitsPerComponent)
Returns the default decode array for this color space.
|
protected ICC_Profile |
getICCProfile() |
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
|
protected void |
init()
Lazy load the ICC profile, because it's slow.
|
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.
|
protected BufferedImage |
toRGBImageAWT(WritableRaster raster,
ColorSpace colorSpace)
Returns the (A)RGB equivalent of the given raster, using the given AWT color space
to perform the conversion.
|
getCOSObject, toStringcreate, create, create, toRawImagepublic static PDDeviceCMYK INSTANCE
protected void init()
throws IOException
IOException - if the ICC profile could not be initializedprotected ICC_Profile getICCProfile() throws IOException
IOExceptionpublic 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)
throws IOException
PDColorSpacetoRGB in class PDColorSpacevalue - a color value with component values between 0 and 1IOException - if the color conversion failspublic BufferedImage toRawImage(WritableRaster raster) throws IOException
PDColorSpacePDColorSpace.toRGBImage(WritableRaster) if this returns null.toRawImage in class PDColorSpaceraster - the source rasterIOException - if the image conversion failspublic BufferedImage toRGBImage(WritableRaster raster) throws IOException
PDColorSpacetoRGBImage in class PDColorSpaceraster - the source rasterIOException - if the color conversion failsprotected BufferedImage toRGBImageAWT(WritableRaster raster, ColorSpace colorSpace)
PDColorSpacetoRGBImageAWT in class PDColorSpaceraster - the source rastercolorSpace - the AWTCopyright © 2002–2022 The Apache Software Foundation. All rights reserved.