Class BogusColorSpace
java.lang.Object
java.awt.color.ColorSpace
com.github.jaiimageio.impl.common.BogusColorSpace
- All Implemented Interfaces:
Serializable
A dummy
ColorSpace
to enable ColorModel
for image data which do not have an innate color representation.- See Also:
-
Field Summary
Fields inherited from class java.awt.color.ColorSpace
CS_CIEXYZ, CS_GRAY, CS_LINEAR_RGB, CS_PYCC, CS_sRGB, TYPE_2CLR, TYPE_3CLR, TYPE_4CLR, TYPE_5CLR, TYPE_6CLR, TYPE_7CLR, TYPE_8CLR, TYPE_9CLR, TYPE_ACLR, TYPE_BCLR, TYPE_CCLR, TYPE_CMY, TYPE_CMYK, TYPE_DCLR, TYPE_ECLR, TYPE_FCLR, TYPE_GRAY, TYPE_HLS, TYPE_HSV, TYPE_Lab, TYPE_Luv, TYPE_RGB, TYPE_XYZ, TYPE_YCbCr, TYPE_Yxy
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionfloat[]
fromCIEXYZ
(float[] xyzvalue) float[]
fromRGB
(float[] rgbvalue) private static int
getType
(int numComponents) Return the type given the number of components.float[]
toCIEXYZ
(float[] colorvalue) float[]
toRGB
(float[] colorvalue) Methods inherited from class java.awt.color.ColorSpace
getInstance, getMaxValue, getMinValue, getName, getNumComponents, getType, isCS_sRGB
-
Constructor Details
-
BogusColorSpace
public BogusColorSpace(int numComponents) Constructs a bogusColorSpace
.- Parameters:
numComponents
- The number of components in theColorSpace
.- Throws:
IllegalArgumentException
- ifnumComponents
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 theColorSpace
.- Throws:
IllegalArgumentException
- ifnumComponents
is less than 1.
-
toRGB
public float[] toRGB(float[] colorvalue) - Specified by:
toRGB
in classColorSpace
-
fromRGB
public float[] fromRGB(float[] rgbvalue) - Specified by:
fromRGB
in classColorSpace
-
toCIEXYZ
public float[] toCIEXYZ(float[] colorvalue) - Specified by:
toCIEXYZ
in classColorSpace
-
fromCIEXYZ
public float[] fromCIEXYZ(float[] xyzvalue) - Specified by:
fromCIEXYZ
in classColorSpace
-