Class PDFDeviceCMYK

java.lang.Object
java.awt.color.ColorSpace
com.inductiveautomation.rm.pdf.reader.PDFDeviceCMYK
All Implemented Interfaces:
Serializable

public class PDFDeviceCMYK extends ColorSpace
This is an implementation of the DeviceCMYK colorspace as defined in the pdf spec. Note that there is a CMYK colorspace profile available from Sun in the JAICMM package, but there are several problems with it. First and foremost, it doesn't generate colors that are consistent with Acrobat. Secondly, it is enormous, at 1/2 meg.

The cmyk->rgb conversion is trivial. rgb->cmyk, however, can be arbitrarily complex as custom black-generation and undercolor-removal functions can be specified in the graphics state.

The spec defines the rgb->cmyk conversion like this : UCR(x) = undercolor-removal function BG(x) = black-generation function k = min(1-red, 1-green, 1-blue) cyan = min(1, max(0, 1-red-UCR(k))) magenta = min(1, max(0, 1-green-UCR(k))) yellow = min(1, max(0, 1-blue-UCR(k))) black = min(1, max(0, BG(k)))

See Also:
  • Constructor Details

    • PDFDeviceCMYK

      public PDFDeviceCMYK()
    • PDFDeviceCMYK

      public PDFDeviceCMYK(int type, int numcomponents)
  • Method Details

    • toRGB

      public float[] toRGB(float[] colorvalue)
      Specified by:
      toRGB in class ColorSpace
    • fromRGB

      public float[] fromRGB(float[] rgbvalue)
      Specified by:
      fromRGB in class ColorSpace
    • toCIEXYZ

      public float[] toCIEXYZ(float[] colorvalue)
      Specified by:
      toCIEXYZ in class ColorSpace
    • fromCIEXYZ

      public float[] fromCIEXYZ(float[] colorvalue)
      Specified by:
      fromCIEXYZ in class ColorSpace