Class YCCKColorSpace

java.lang.Object
java.awt.color.ColorSpace
org.openpdf.renderer.colorspace.YCCKColorSpace
All Implemented Interfaces:
Serializable

public class YCCKColorSpace extends ColorSpace
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 Details

    • cmykColorSpace

      private final ColorSpace cmykColorSpace
  • Constructor Details

    • YCCKColorSpace

      public YCCKColorSpace(ColorSpace existingCmykColorSpace)
      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:
      fromCIEXYZ in class ColorSpace
    • fromRGB

      public float[] fromRGB(float[] rgbvalue)
      Convert from RGB to YCCK. NOT IMPLEMENTED
      Specified by:
      fromRGB in class ColorSpace
      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:
      getNumComponents in class ColorSpace
    • getName

      public String getName(int idx)
      the name of this color space
      Overrides:
      getName in class ColorSpace
    • getType

      public int getType()
      the type of this color space (TYPE_4CLR)
      Overrides:
      getType in class ColorSpace
    • toCIEXYZ

      public float[] toCIEXYZ(float[] colorvalue)
      Convert from YCCK to CIEXYZ. NOT IMPLEMENTED
      Specified by:
      toCIEXYZ in class ColorSpace
    • toRGB

      public float[] toRGB(float[] colorvalue)
      Convert from YCCK to RGB.
      Specified by:
      toRGB in class ColorSpace
      Parameters:
      colorvalue - the YCCK values (0-1)
      Returns:
      the RGB values (0-1)
    • toCmyk

      private float[] toCmyk(float[] colorvalue)