Class CalRGBColor

java.lang.Object
java.awt.color.ColorSpace
com.sun.pdfview.colorspace.CalRGBColor
All Implemented Interfaces:
Serializable

public class CalRGBColor extends ColorSpace
A ColorSpace for calibrated RGB
See Also:
  • Field Details

    • vonKriesM

      private static final float[] vonKriesM
    • vonKriesMinv

      private static final float[] vonKriesMinv
    • xyzToSRGB

      private static final float[] xyzToSRGB
    • xyzToRGB

      private static final float[] xyzToRGB
    • scale

      float[] scale
    • max

      float[] max
    • white

      float[] white
    • black

      float[] black
    • matrix

      float[] matrix
    • gamma

      float[] gamma
    • rgbCS

      static ColorSpace rgbCS
    • cieCS

      static ColorSpace cieCS
  • Constructor Details

    • CalRGBColor

      public CalRGBColor(PDFObject obj) throws IOException
      Create a new Calibrated RGB 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", a Number for "Gamma", and an array of 9 Numbers for "Matrix".
      Throws:
      IOException
  • Method Details

    • getNumComponents

      public int getNumComponents()
      get the number of components (3)
      Overrides:
      getNumComponents in class ColorSpace
    • toRGB

      public float[] toRGB(float[] comp)
      convert from Calibrated RGB to standard RGB
      Specified by:
      toRGB in class ColorSpace
      Parameters:
      comp - the Calibrated RGB values (0-1)
      Returns:
      the RGB values (0-1)
    • ciexyzToSRGB

      private float[] ciexyzToSRGB(float[] xyz)
      Convert from CIEXYZ, with scale and gamma calculated to sRGB
    • fromRGB

      public float[] fromRGB(float[] rgbvalue)
      convert from RGB to Calibrated RGB. NOT IMPLEMENTED
      Specified by:
      fromRGB in class ColorSpace
    • fromCIEXYZ

      public float[] fromCIEXYZ(float[] colorvalue)
      convert from CIEXYZ to Calibrated RGB. NOT IMPLEMENTED
      Specified by:
      fromCIEXYZ in class ColorSpace
    • getType

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

      public float[] toCIEXYZ(float[] colorvalue)
      convert from Calibrated RGB to CIEXYZ. NOT IMPLEMENTED
      Specified by:
      toCIEXYZ in class ColorSpace
    • matrixMult

      float[] matrixMult(float[] a, float[] b, int len)
      Slowly multiply two matrices
      Parameters:
      a - the first matrix
      b - the second matrix
      len - the size of each row. All matrix lengths must be a multiple of len.