public final class PDLab extends PDCIEDictionaryBasedColorSpace
Modifier and Type | Field and Description |
---|---|
private PDColor |
initialColor |
dictionary, wpX, wpY, wpZ
array
Constructor and Description |
---|
PDLab()
Creates a new Lab color space.
|
PDLab(COSArray lab)
Creates a new Lab color space from a PDF array.
|
Modifier and Type | Method and Description |
---|---|
PDRange |
getARange()
This will get the valid range for the "a" component.
|
PDRange |
getBRange()
This will get the valid range for the "b" component.
|
float[] |
getDefaultDecode(int bitsPerComponent)
Returns the default decode array for this color space.
|
private COSArray |
getDefaultRangeArray()
creates a range array with default values (-100..100 -100..100).
|
PDColor |
getInitialColor()
Returns the initial color value for this color space.
|
java.lang.String |
getName()
Returns the name of the color space.
|
int |
getNumberOfComponents()
Returns the number of components in this color space
|
private float |
inverse(float x) |
void |
setARange(PDRange range)
This will set the a range for the "a" component.
|
void |
setBRange(PDRange range)
This will set the "b" range for this color space.
|
private void |
setComponentRangeArray(PDRange range,
int index) |
float[] |
toRGB(float[] value)
Returns the RGB equivalent of the given color value.
|
java.awt.image.BufferedImage |
toRGBImage(java.awt.image.WritableRaster raster)
Returns the (A)RGB equivalent of the given raster.
|
convXYZtoRGB, getBlackPoint, getWhitepoint, setBlackPoint, setWhitePoint
toString
create, create, create, getCOSObject, toRGBImageAWT
private PDColor initialColor
public PDLab()
public PDLab(COSArray lab)
lab
- the color space arraypublic java.lang.String getName()
PDColorSpace
getName
in class PDColorSpace
public java.awt.image.BufferedImage toRGBImage(java.awt.image.WritableRaster raster) throws java.io.IOException
PDColorSpace
toRGBImage
in class PDCIEBasedColorSpace
raster
- the source rasterjava.io.IOException
- if the color conversion failspublic float[] toRGB(float[] value)
PDColorSpace
toRGB
in class PDColorSpace
value
- a color value with component values between 0 and 1private float inverse(float x)
public int getNumberOfComponents()
PDColorSpace
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
private COSArray getDefaultRangeArray()
public PDRange getARange()
public PDRange getBRange()
public void setARange(PDRange range)
range
- the new range for the "a" component,
or null if defaults (-100..100) are to be set.public void setBRange(PDRange range)
range
- the new range for the "b" component,
or null if defaults (-100..100) are to be set.private void setComponentRangeArray(PDRange range, int index)