Top Description Fields Constructors Methods
com.sun.imageio.plugins.common

public Class BogusColorSpace

extends ColorSpace
Class Inheritance
Annotations
@SuppressWarnings:serial
Imports
java.awt.color.ColorSpace

A dummy ColorSpace to enable ColorModel for image data which do not have an innate color representation.

Field Summary

Inherited from java.awt.color.ColorSpace:
CS_CIEXYZCS_GRAYCS_LINEAR_RGBCS_PYCCCS_sRGBTYPE_2CLRTYPE_3CLRTYPE_4CLRTYPE_5CLRTYPE_6CLRTYPE_7CLRTYPE_8CLRTYPE_9CLRTYPE_ACLRTYPE_BCLRTYPE_CCLRTYPE_CMYTYPE_CMYKTYPE_DCLRTYPE_ECLRTYPE_FCLRTYPE_GRAYTYPE_HLSTYPE_HSVTYPE_LabTYPE_LuvTYPE_RGBTYPE_XYZTYPE_YCbCrTYPE_Yxy

Constructor Summary

AccessConstructor and Description
public
BogusColorSpace(int
The number of components in the ColorSpace.
numComponents
)

Constructs a bogus ColorSpace.

Method Summary

Modifier and TypeMethod and Description
public float[]
fromCIEXYZ(float[]
a float array with length of at least 3
xyzvalue
)

Implements abstract java.awt.color.ColorSpace.fromCIEXYZ.

Transforms a color value assumed to be in the CS_CIEXYZ conversion color space into this ColorSpace.

public float[]
fromRGB(float[]
a float array with length of at least 3
rgbvalue
)

Implements abstract java.awt.color.ColorSpace.fromRGB.

Transforms a color value assumed to be in the default CS_sRGB color space into this ColorSpace.

private static int
getType(int
The number of components in the ColorSpace.
numComponents
)

Return the type given the number of components.

public float[]
toCIEXYZ(float[]
a float array with length of at least the number of components in this ColorSpace
colorvalue
)

Implements abstract java.awt.color.ColorSpace.toCIEXYZ.

Transforms a color value assumed to be in this ColorSpace into the CS_CIEXYZ conversion color space.

public float[]
toRGB(float[]
a float array with length of at least the number of components in this ColorSpace
colorvalue
)

Implements abstract java.awt.color.ColorSpace.toRGB.

Transforms a color value assumed to be in this ColorSpace into a value in the default CS_sRGB color space.

Inherited from java.awt.color.ColorSpace:
getInstancegetMaxValuegetMinValuegetNamegetNumComponentsgetTypeisCS_sRGB

Constructor Detail

BogusColorSpaceback to summary
public BogusColorSpace(int numComponents)

Constructs a bogus ColorSpace.

Parameters
numComponents:int

The number of components in the ColorSpace.

Exceptions
IllegalArgumentException:
if numComponents is less than 1.

Method Detail

fromCIEXYZback to summary
public float[] fromCIEXYZ(float[] xyzvalue)

Implements abstract java.awt.color.ColorSpace.fromCIEXYZ.

Doc from java.awt.color.ColorSpace.fromCIEXYZ.

Transforms a color value assumed to be in the CS_CIEXYZ conversion color space into this ColorSpace.

This method transforms color values using relative colorimetry, as defined by the International Color Consortium standard. This means that the XYZ argument values taken by this method are represented relative to the D50 white point of the CS_CIEXYZ color space. This representation is useful in a two-step color conversion process in which colors are transformed from an input color space to CS_CIEXYZ and then to an output color space. The color values returned by this method are not those that would produce the XYZ value passed to the method when measured by a colorimeter. If you have XYZ values corresponding to measurements made using current CIE recommended practices, they must be converted to D50 relative values before being passed to this method. See the fromCIEXYZ method of ICC_ColorSpace for further information.

Parameters
xyzvalue:float[]

a float array with length of at least 3

Returns:float[]

a float array with length equal to the number of components in this ColorSpace

fromRGBback to summary
public float[] fromRGB(float[] rgbvalue)

Implements abstract java.awt.color.ColorSpace.fromRGB.

Doc from java.awt.color.ColorSpace.fromRGB.

Transforms a color value assumed to be in the default CS_sRGB color space into this ColorSpace.

This method transforms color values using algorithms designed to produce the best perceptual match between input and output colors. In order to do colorimetric conversion of color values, you should use the toCIEXYZ method of the CS_sRGB color space to first convert from the input color space to the CS_CIEXYZ color space, and then use the fromCIEXYZ method of this color space to convert from CS_CIEXYZ to the output color space. See toCIEXYZ and fromCIEXYZ for further information.

Parameters
rgbvalue:float[]

a float array with length of at least 3

Returns:float[]

a float array with length equal to the number of components in this ColorSpace

getTypeback to summary
private static int getType(int numComponents)

Return the type given the number of components.

Parameters
numComponents:int

The number of components in the ColorSpace.

Exceptions
IllegalArgumentException:
if numComponents is less than 1.
toCIEXYZback to summary
public float[] toCIEXYZ(float[] colorvalue)

Implements abstract java.awt.color.ColorSpace.toCIEXYZ.

Doc from java.awt.color.ColorSpace.toCIEXYZ.

Transforms a color value assumed to be in this ColorSpace into the CS_CIEXYZ conversion color space.

This method transforms color values using relative colorimetry, as defined by the International Color Consortium standard. This means that the XYZ values returned by this method are represented relative to the D50 white point of the CS_CIEXYZ color space. This representation is useful in a two-step color conversion process in which colors are transformed from an input color space to CS_CIEXYZ and then to an output color space. This representation is not the same as the XYZ values that would be measured from the given color value by a colorimeter. A further transformation is necessary to compute the XYZ values that would be measured using current CIE recommended practices. See the toCIEXYZ method of ICC_ColorSpace for further information.

Parameters
colorvalue:float[]

a float array with length of at least the number of components in this ColorSpace

Returns:float[]

a float array of length 3

toRGBback to summary
public float[] toRGB(float[] colorvalue)

Implements abstract java.awt.color.ColorSpace.toRGB.

Doc from java.awt.color.ColorSpace.toRGB.

Transforms a color value assumed to be in this ColorSpace into a value in the default CS_sRGB color space.

This method transforms color values using algorithms designed to produce the best perceptual match between input and output colors. In order to do colorimetric conversion of color values, you should use the toCIEXYZ method of this color space to first convert from the input color space to the CS_CIEXYZ color space, and then use the fromCIEXYZ method of the CS_sRGB color space to convert from CS_CIEXYZ to the output color space. See toCIEXYZ and fromCIEXYZ for further information.

Parameters
colorvalue:float[]

a float array with length of at least the number of components in this ColorSpace

Returns:float[]

a float array of length 3