Package com.sun.pdfview.colorspace
Class LabColor
java.lang.Object
java.awt.color.ColorSpace
com.sun.pdfview.colorspace.LabColor
- All Implemented Interfaces:
Serializable
A ColorSpace for Lab color
- See Also:
-
Field Summary
FieldsModifier and TypeFieldDescription(package private) float[]
(package private) static ColorSpace
(package private) float[]
(package private) float[]
Fields inherited from class java.awt.color.ColorSpace
CS_CIEXYZ, CS_GRAY, CS_LINEAR_RGB, CS_PYCC, CS_sRGB, TYPE_2CLR, TYPE_3CLR, TYPE_4CLR, TYPE_5CLR, TYPE_6CLR, TYPE_7CLR, TYPE_8CLR, TYPE_9CLR, TYPE_ACLR, TYPE_BCLR, TYPE_CCLR, TYPE_CMY, TYPE_CMYK, TYPE_DCLR, TYPE_ECLR, TYPE_FCLR, TYPE_GRAY, TYPE_HLS, TYPE_HSV, TYPE_Lab, TYPE_Luv, TYPE_RGB, TYPE_XYZ, TYPE_YCbCr, TYPE_Yxy
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionfloat[]
fromCIEXYZ
(float[] colorvalue) convert from CIEXYZ to Lab.float[]
fromRGB
(float[] rgbvalue) convert from RGB to Lab.int
get the number of components for this color space (3)int
getType()
get the type of this colorspace (TYPE_Lab)final float
stage2
(float s1) Stage 2 of the conversion algorithm.float[]
toCIEXYZ
(float[] colorvalue) convert from Lab to CIEXYZ.float[]
toRGB
(float[] comp) convert from Lab to RGBMethods inherited from class java.awt.color.ColorSpace
getInstance, getMaxValue, getMinValue, getName, isCS_sRGB
-
Field Details
-
white
float[] white -
black
float[] black -
range
float[] range -
cie
-
-
Constructor Details
-
LabColor
Create a new Lab color space object, given the description in a PDF dictionary.- Parameters:
obj
- a dictionary that contains an Array of 3 Numbers for "WhitePoint" and "BlackPoint", and an array of 4 Numbers for "Range".- Throws:
IOException
-
-
Method Details
-
getNumComponents
public int getNumComponents()get the number of components for this color space (3)- Overrides:
getNumComponents
in classColorSpace
-
stage2
public final float stage2(float s1) Stage 2 of the conversion algorithm. Pulled out because it gets invoked for each component -
toRGB
public float[] toRGB(float[] comp) convert from Lab to RGB- Specified by:
toRGB
in classColorSpace
- Parameters:
comp
- the Lab values (0-1)- Returns:
- the RGB values (0-1)
-
fromRGB
public float[] fromRGB(float[] rgbvalue) convert from RGB to Lab. NOT IMPLEMENTED- Specified by:
fromRGB
in classColorSpace
-
fromCIEXYZ
public float[] fromCIEXYZ(float[] colorvalue) convert from CIEXYZ to Lab. NOT IMPLEMENTED- Specified by:
fromCIEXYZ
in classColorSpace
-
getType
public int getType()get the type of this colorspace (TYPE_Lab)- Overrides:
getType
in classColorSpace
-
toCIEXYZ
public float[] toCIEXYZ(float[] colorvalue) convert from Lab to CIEXYZ. NOT IMPLEMENTED- Specified by:
toCIEXYZ
in classColorSpace
-