| Modifier and Type | Field and Description |
|---|---|
| protected COSArray | |
| private final ColorConvertOp |
| Access | Constructor and Description |
|---|---|
| public |
| Modifier and Type | Method and Description |
|---|---|
| public static PDColorSpace | |
| public static PDColorSpace | Returns: a new color spacethe color space COS object colorSpace, PDResources the current resources. resources)Creates a color space given a name or array. |
| public static PDColorSpace | Returns: a new color space.the color space COS object colorSpace, PDResources the current resources. resources, boolean if current color space was used by a default color space. wasDefault)Creates a color space given a name or array. |
| private static PDColorSpace | |
| public COSBase | getCOSObject()
Implements org. Convert this standard java object to a COS object. |
| public abstract float[] | Returns: the default decode arraythe number of bits per component. bitsPerComponent)Returns the default decode array for this color space. |
| public abstract PDColor | Returns: the initial color value for this color spaceReturns the initial color value for this color space. |
| public abstract String | |
| public abstract int | Returns: the number of components in this color spaceReturns the number of components in this color space |
| public abstract BufferedImage | Returns: an buffered image in this colorspace. Or null if it is not possible to extract that image with the original colorspace without conversion.the source raster raster)Returns the image in this colorspace or null. |
| protected final BufferedImage | Returns: a BufferedImage in this colorspacethe source raster raster, ColorSpace the AWT colorspace awtColorSpace)Returns the given raster as BufferedImage with the given awtColorSpace using a ComponentColorModel. |
| public abstract float[] | Returns: an array of R,G,B value between 0 and 255a color value with component values between 0 and 1 value)Returns the RGB equivalent of the given color value. |
| public abstract BufferedImage | Returns: an (A)RGB buffered imagethe source raster raster)Returns the (A)RGB equivalent of the given raster. |
| protected BufferedImage | Returns: an (A)RGB buffered imagethe source raster raster, ColorSpace the AWT colorSpace)Returns the (A)RGB equivalent of the given raster, using the given AWT color space to perform the conversion. |
| array | back to summary |
|---|---|
| protected COSArray array | |
| colorConvertOp | back to summary |
|---|---|
| private final ColorConvertOp colorConvertOp | |
| PDColorSpace | back to summary |
|---|---|
| public PDColorSpace() | |
| create | back to summary |
|---|---|
| public static PDColorSpace create(COSBase colorSpace) throws IOException Creates a color space given a name or array.
| |
| create | back to summary |
|---|---|
| public static PDColorSpace create(COSBase colorSpace, PDResources resources) throws IOException Creates a color space given a name or array. Abbreviated device color names are not supported here, please replace them first.
| |
| create | back to summary |
|---|---|
| public static PDColorSpace create(COSBase colorSpace, PDResources resources, boolean wasDefault) throws IOException Creates a color space given a name or array. Abbreviated device color names are not supported
here, please replace them first. This method is for PDFBox internal use only, others should
use
| |
| createFromCOSObject | back to summary |
|---|---|
| private static PDColorSpace createFromCOSObject(COSObject colorSpace, PDResources resources) throws IOException | |
| getCOSObject | back to summary |
|---|---|
| public COSBase getCOSObject() Implements org. Doc from org. Convert this standard java object to a COS object. | |
| getDefaultDecode | back to summary |
|---|---|
| public abstract float[] getDefaultDecode(int bitsPerComponent) Returns the default decode array for this color space.
| |
| getInitialColor | back to summary |
|---|---|
| public abstract PDColor getInitialColor() Returns the initial color value for this color space.
| |
| getName | back to summary |
|---|---|
| public abstract String getName() Returns the name of the color space.
| |
| getNumberOfComponents | back to summary |
|---|---|
| public abstract int getNumberOfComponents() Returns the number of components in this color space
| |
| toRawImage | back to summary |
|---|---|
| public abstract BufferedImage toRawImage(WritableRaster raster) throws IOException Returns the image in this colorspace or null. No conversion is performed.
For special colorspaces like PDSeparation the image is returned in the gray colorspace. For undefined colorspaces
like DeviceCMYK/DeviceRGB and DeviceGray null is returned.
You can always fallback to
| |
| toRawImage | back to summary |
|---|---|
| protected final BufferedImage toRawImage(WritableRaster raster, ColorSpace awtColorSpace) Returns the given raster as BufferedImage with the given awtColorSpace using a ComponentColorModel.
| |
| toRGB | back to summary |
|---|---|
| public abstract float[] toRGB(float[] value) throws IOException Returns the RGB equivalent of the given color value.
| |
| toRGBImage | back to summary |
|---|---|
| public abstract BufferedImage toRGBImage(WritableRaster raster) throws IOException Returns the (A)RGB equivalent of the given raster.
| |
| toRGBImageAWT | back to summary |
|---|---|
| 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.
| |