Spec-Zone .ru
спецификации, руководства, описания, API
JavaTM 2 Platform
Standard Edition

java.awt.color
Class ICC_ColorSpace

java.lang.Object
  |
  +--java.awt.color.ColorSpace
        |
        +--java.awt.color.ICC_ColorSpace

public class ICC_ColorSpace
extends ColorSpace

An implementation of the abstract ColorSpace class. This representation of device independent and device dependent color spaces is based on the ICC Profile Format Specification, Version 3.4, August 15, 1997, from the International Color Consortium (see http://www.color.org).

Typically, a Color or ColorModel would be associated with an ICC Profile which is either an input, display, or output profile (see the ICC specification). There are other types of ICC Profiles, e.g. abstract profiles, device link profiles, and named color profiles, which do not contain information appropriate for representing the color space of a color, image, or device (see ICC_Profile). Attempting to create an ICC_ColorSpace object from an inappropriate ICC Profile is an error.

ICC Profiles represent transformations from the color space of the profile (e.g. a monitor) to a Profile Connection Space (PCS). Profiles of interest for tagging images or colors have a PCS which is one of the two specific device independent spaces (one CIEXYZ space and one CIELab space) defined in the ICC Profile Format Specification. Most profiles of interest either have invertible transformations or explicitly specify transformations going both directions. Should an ICC_ColorSpace object be used in a way requiring a conversion from PCS to the profile's native space and there is inadequate data to correctly perform the conversion, the ICC_ColorSpace object will produce output in the specified type of color space (e.g. TYPE_RGB, TYPE_CMYK, etc.), but the specific color values of the output data will be undefined.

The details of this class are not important for simple applets, which draw in a default color space or manipulate and display imported images with a known color space. At most, such applets would need to get one of the default color spaces via ColorSpace.getInstance().

See Also:
ColorSpace, ICC_Profile

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
ICC_ColorSpace(ICC_Profile profile)
          Constructs a new ICC_ColorSpace from an ICC_Profile object.
 
Method Summary
 float[] fromCIEXYZ(float[] colorvalue)
          Transforms a color value assumed to be in the CS_CIEXYZ conversion color space into this ColorSpace.
 float[] fromRGB(float[] rgbvalue)
          Transforms a color value assumed to be in the default CS_sRGB color space into this ColorSpace.
 ICC_Profile getProfile()
          Returns the ICC_Profile for this ICC_ColorSpace.
 float[] toCIEXYZ(float[] colorvalue)
          Transforms a color value assumed to be in this ColorSpace into the CS_CIEXYZ conversion color space.
 float[] toRGB(float[] colorvalue)
          Transforms a color value assumed to be in this ColorSpace into a value in the default CS_sRGB color space.
 
Methods inherited from class java.awt.color.ColorSpace
getInstance, getName, getNumComponents, getType, isCS_sRGB
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ICC_ColorSpace

public ICC_ColorSpace(ICC_Profile profile)
Constructs a new ICC_ColorSpace from an ICC_Profile object.
Throws:
IllegalArgumentException - if profile is inappropriate for representing a ColorSpace.
Method Detail

getProfile

public ICC_Profile getProfile()
Returns the ICC_Profile for this ICC_ColorSpace.

toRGB

public float[] toRGB(float[] colorvalue)
Transforms a color value assumed to be in this ColorSpace into a value in the default CS_sRGB color space.
Overrides:
toRGB in class ColorSpace
Parameters:
colorvalue - a float array with length of at least the number of components in this ColorSpace.
Returns:
a float array of length 3.

fromRGB

public float[] fromRGB(float[] rgbvalue)
Transforms a color value assumed to be in the default CS_sRGB color space into this ColorSpace.
Overrides:
fromRGB in class ColorSpace
Parameters:
rgbvalue - a float array with length of at least 3.
Returns:
a float array with length equal to the number of components in this ColorSpace.

toCIEXYZ

public float[] toCIEXYZ(float[] colorvalue)
Transforms a color value assumed to be in this ColorSpace into the CS_CIEXYZ conversion color space.
Overrides:
toCIEXYZ in class ColorSpace
Parameters:
colorvalue - a float array with length of at least the number of components in this ColorSpace.
Returns:
a float array of length 3.

fromCIEXYZ

public float[] fromCIEXYZ(float[] colorvalue)
Transforms a color value assumed to be in the CS_CIEXYZ conversion color space into this ColorSpace.
Overrides:
fromCIEXYZ in class ColorSpace
Parameters:
colorvalue - a float array with length of at least 3.
Returns:
a float array with length equal to the number of components in this ColorSpace.

JavaTM 2 Platform
Standard Edition

Submit a bug or feature
Java, Java 2D, and JDBC are a trademarks or registered trademarks of Sun Microsystems, Inc. in the US and other countries.
Copyright 1993-1999 Sun Microsystems, Inc. 901 San Antonio Road,
Palo Alto, California, 94303, U.S.A. All Rights Reserved.