Class BogusColorSpace

java.lang.Object
java.awt.color.ColorSpace
com.github.jaiimageio.impl.common.BogusColorSpace
All Implemented Interfaces:
Serializable

public class BogusColorSpace extends ColorSpace
A dummy ColorSpace to enable ColorModel for image data which do not have an innate color representation.
See Also:
  • Constructor Details

    • BogusColorSpace

      public BogusColorSpace(int numComponents)
      Constructs a bogus ColorSpace.
      Parameters:
      numComponents - The number of components in the ColorSpace.
      Throws:
      IllegalArgumentException - if numComponents is less than 1.
  • Method Details

    • getType

      private static int getType(int numComponents)
      Return the type given the number of components.
      Parameters:
      numComponents - The number of components in the ColorSpace.
      Throws:
      IllegalArgumentException - if numComponents is less than 1.
    • 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[] xyzvalue)
      Specified by:
      fromCIEXYZ in class ColorSpace