Class LabColor

java.lang.Object
java.awt.color.ColorSpace
org.loboevolution.pdfview.colorspace.LabColor
All Implemented Interfaces:
Serializable

public class LabColor extends ColorSpace
A ColorSpace for Lab color

Author Mike Wessler

See Also:
  • Constructor Details

    • LabColor

      public LabColor(PDFObject obj) throws IOException
      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 - if any.
  • Method Details

    • getNumComponents

      public int getNumComponents()

      get the number of components for this color space (3)

      Overrides:
      getNumComponents in class ColorSpace
    • stage2

      public final float stage2(float s1)
      Stage 2 of the conversion algorithm. Pulled out because it gets invoked for each component
      Parameters:
      s1 - a float.
      Returns:
      a float.
    • toRGB

      public float[] toRGB(float[] comp)

      convert from Lab to RGB

      Specified by:
      toRGB in class ColorSpace
    • fromRGB

      public float[] fromRGB(float[] rgbvalue)

      convert from RGB to Lab. NOT IMPLEMENTED

      Specified by:
      fromRGB in class ColorSpace
    • fromCIEXYZ

      public float[] fromCIEXYZ(float[] colorvalue)

      convert from CIEXYZ to Lab. NOT IMPLEMENTED

      Specified by:
      fromCIEXYZ in class ColorSpace
    • getType

      public int getType()

      get the type of this colorspace (TYPE_Lab)

      Overrides:
      getType in class ColorSpace
    • toCIEXYZ

      public float[] toCIEXYZ(float[] colorvalue)

      convert from Lab to CIEXYZ. NOT IMPLEMENTED

      Specified by:
      toCIEXYZ in class ColorSpace