Chapter 10. The java.awt.color PackageThe java.awt.color package includes the abstract ColorSpace class, which defines methods necessary for converting colors between arbitrary color spaces. The package also contains implementations of the ColorSpace class based on data contained in ICC profile files. (The ICC is the international color standards body.) Most applications do not need to use this package; it is required only for applications that perform sophisticated image processing or require extremely accurate device-independent color display. Figure 10-1 shows the class hierarchy of this package, which is new in Java 1.2. This package does not contain classes for representing colors. See the java.awt.Color class instead. Figure 10-1. The java.awt.color package
Signals that an error has occurred in the internal color space management code.
Hierarchy: Object-->Throwable(Serializable)-->Exception-->RuntimeException-->CMMException
This abstract class encapsulates a color space: a system of representing colors using some number of floating-point color components. For examples, sRGB is a proposed standard color space that represents colors in terms of red, green, and blue components, while CIEXYZ is an international standard color space that represents colors in terms of three color components named X, Y, and Z. Typically, only applications that are doing image processing or are concerned with very precise color reproduction need to use this class. ColorSpace does not have a public constructor. You can obtain an instance by calling the static getInstance() method and passing in one of the CS_ constants to specify the type of color space you want. Alternatively, implement and instantiate your own concrete subclass. Each ColorSpace object has methods to convert a color to and from the standard sRGB and CIEXYZ color spaces. This ensures that any color, regardless of its color space, can be converted to the red, green, and blue values used by computer display devices. It also ensures that a color represented in an arbitrary color space can be transformed to any other color space by first converting to an intermediate CIEXYZ representation.
Subclasses: ICC_ColorSpace Passed To: Color.{Color(), getColorComponents(), getComponents()}, java.awt.image.ColorConvertOp.ColorConvertOp(), java.awt.image.ColorModel.ColorModel(), java.awt.image.ComponentColorModel.ComponentColorModel(), java.awt.image.DirectColorModel.DirectColorModel(), java.awt.image.PackedColorModel.PackedColorModel() Returned By: Color.getColorSpace(), ColorSpace.getInstance(), java.awt.image.ColorModel.getColorSpace()
This concrete subclass of ColorSpace defines a color space based on an ICC_Profile object that represents color space profile data in a format defined by the International Color Consortium (ICC). See http://www.color.org for information about ICC standards.
Hierarchy: Object-->ColorSpace-->ICC_ColorSpace
This class represents an International Color Consortium (ICC) color space profile. For details about the profile format, see the ICC Profile Format Specification, Version 3.4, at http://www.color.org. Only applications working with custom or specialized color spaces ever need to use this class. ICC_Profile does not have a public constructor. Obtain an instance by calling the static getInstance() method. There are versions of this method that read profile data from a java.io.InputStream, a string, and an array of bytes. The fourth version of this method takes one of the CS_ constants defined by the ColorSpace class and reads a built-in profile for that color space. (In Sun's Java 1.2 implementation, the profile data for these built-in standard color spaces is in the directory jre/lib/cmm.)
Subclasses: ICC_ProfileGray, ICC_ProfileRGB Passed To: ICC_ColorSpace.ICC_ColorSpace(), java.awt.image.ColorConvertOp.ColorConvertOp() Returned By: ICC_ColorSpace.getProfile(), ICC_Profile.getInstance(), java.awt.image.ColorConvertOp.getICC_Profiles()
A specialized subclass of ICC_Profile that is used to represent certain grayscale color spaces that meet criteria that allow color space conversions to be optimized. Applications never need to use this class.
Hierarchy: Object-->ICC_Profile-->ICC_ProfileGray
A specialized subclass of ICC_Profile that is used to represent certain RGB color spaces that meet criteria that allow color space conversions to be optimized. Applications never need to use this class.
Hierarchy: Object-->ICC_Profile-->ICC_ProfileRGB
Signals that an error occurred while reading ICC profile data.
Hierarchy: Object-->Throwable(Serializable)-->Exception-->RuntimeException-->ProfileDataException Copyright © 2001 O'Reilly & Associates. All rights reserved. | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|