public final class PDDeviceRGB extends PDDeviceColorSpace
Modifier and Type | Field and Description |
---|---|
static PDDeviceRGB |
INSTANCE
This is the single instance of this class.
|
array
Modifier and Type | Method and Description |
---|---|
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
|
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.
|
getCOSObject, toString
create, create, create, toRawImage, toRGBImageAWT
public static final PDDeviceRGB INSTANCE
public String getName()
PDColorSpace
getName
in class PDColorSpace
public int getNumberOfComponents()
getNumberOfComponents
in class PDColorSpace
public float[] getDefaultDecode(int bitsPerComponent)
PDColorSpace
getDefaultDecode
in class PDColorSpace
bitsPerComponent
- the number of bits per component.public PDColor getInitialColor()
PDColorSpace
getInitialColor
in class PDColorSpace
public float[] toRGB(float[] value)
PDColorSpace
toRGB
in class PDColorSpace
value
- a color value with component values between 0 and 1public BufferedImage toRGBImage(WritableRaster raster) throws IOException
PDColorSpace
toRGBImage
in class PDColorSpace
raster
- the source rasterIOException
- if the color conversion failspublic BufferedImage toRawImage(WritableRaster raster) throws IOException
PDColorSpace
PDColorSpace.toRGBImage(WritableRaster)
if this returns null.toRawImage
in class PDColorSpace
raster
- the source rasterIOException
Copyright © 2002–2023 The Apache Software Foundation. All rights reserved.