Package org.openpdf.renderer.colorspace
Class YCCKColorSpace
java.lang.Object
java.awt.color.ColorSpace
org.openpdf.renderer.colorspace.YCCKColorSpace
- All Implemented Interfaces:
Serializable
A ColorSpace for the YCCK color space. This color space converts to CMYK and then
uses an existing CMYK color space to convert from CMYK to RGB. This allows embedded
CMYK color profiles to be used with YCCK images. If no CMYK color space is
provided then by default it uses a CMYKColorSpace. Only toRGB is supported.
- See Also:
-
Field Summary
FieldsFields 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
ConstructorsConstructorDescriptionYCCKColorSpace(ColorSpace existingCmykColorSpace) create a new YCCK color space: a ColorSpace with 4 components -
Method Summary
Modifier and TypeMethodDescriptionfloat[]fromCIEXYZ(float[] colorvalue) Convert from CIEXYZ to RGB.float[]fromRGB(float[] rgbvalue) Convert from RGB to YCCK.getName(int idx) the name of this color spaceintthe number of componentsintgetType()the type of this color space (TYPE_4CLR)float[]toCIEXYZ(float[] colorvalue) Convert from YCCK to CIEXYZ.private float[]toCmyk(float[] colorvalue) float[]toRGB(float[] colorvalue) Convert from YCCK to RGB.Methods inherited from class java.awt.color.ColorSpace
getInstance, getMaxValue, getMinValue, isCS_sRGB
-
Field Details
-
cmykColorSpace
-
-
Constructor Details
-
YCCKColorSpace
create a new YCCK color space: a ColorSpace with 4 components -
YCCKColorSpace
public YCCKColorSpace()
-
-
Method Details
-
fromCIEXYZ
public float[] fromCIEXYZ(float[] colorvalue) Convert from CIEXYZ to RGB. NOT IMPLEMENTED- Specified by:
fromCIEXYZin classColorSpace
-
fromRGB
public float[] fromRGB(float[] rgbvalue) Convert from RGB to YCCK. NOT IMPLEMENTED- Specified by:
fromRGBin classColorSpace- Parameters:
rgbvalue- the red, green, and blue values (0-1)- Returns:
- the YCCK values (0-1)
-
getNumComponents
public int getNumComponents()the number of components- Overrides:
getNumComponentsin classColorSpace
-
getName
the name of this color space- Overrides:
getNamein classColorSpace
-
getType
public int getType()the type of this color space (TYPE_4CLR)- Overrides:
getTypein classColorSpace
-
toCIEXYZ
public float[] toCIEXYZ(float[] colorvalue) Convert from YCCK to CIEXYZ. NOT IMPLEMENTED- Specified by:
toCIEXYZin classColorSpace
-
toRGB
public float[] toRGB(float[] colorvalue) Convert from YCCK to RGB.- Specified by:
toRGBin classColorSpace- Parameters:
colorvalue- the YCCK values (0-1)- Returns:
- the RGB values (0-1)
-
toCmyk
private float[] toCmyk(float[] colorvalue)
-