Java Platform 1.2
Beta 4

Class java.awt.color.ICC_Profile

java.lang.Object
  |
  +--java.awt.color.ICC_Profile
Direct Known Subclasses:
ICC_ProfileGray, ICC_ProfileRGB

public class ICC_Profile
extends Object
A representation of color profile data for device independent and device dependent color spaces based on the ICC Profile Format Specification, Version 3.4, August 15, 1997, from the International Color Consortium.

An ICC_ColorSpace object can be constructed from an appropriate ICC_Profile. Typically, an ICC_ColorSpace would be associated with an ICC Profile which is either an input, display, or output profile (see the ICC specification). There are also device link, abstract, color space conversion, and named color profiles. These are less useful for tagging a color or image, but are useful for other purposes (in particular device link profiles can provide improved performance for converting from one device's color space to another's).

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.

See Also:
ICC_ColorSpace

Field Summary
static int CLASS_ABSTRACT
          Profile class is abstract.
static int CLASS_COLORSPACECONVERSION
          Profile class is color space conversion.
static int CLASS_DEVICELINK
          Profile class is device link.
static int CLASS_DISPLAY
          Profile class is display.
static int CLASS_INPUT
          Profile class is input.
static int CLASS_NAMEDCOLOR
          Profile class is named color.
static int CLASS_OUTPUT
          Profile class is output.
static int icAbsoluteColorimetric
          .
static int icCurveCount
           
static int icCurveData
           
static int icHdrAttributes
           
static int icHdrCmmId
           
static int icHdrColorSpace
           
static int icHdrCreator
          .
static int icHdrDate
           
static int icHdrDeviceClass
           
static int icHdrFlags
           
static int icHdrIlluminant
           
static int icHdrMagic
           
static int icHdrManufacturer
           
static int icHdrModel
           
static int icHdrPcs
           
static int icHdrPlatform
           
static int icHdrRenderingIntent
           
static int icHdrSize
           
static int icHdrVersion
           
static int icPerceptual
           
static int icRelativeColorimetric
           
static int icSaturation
           
static int icSigAbstractClass
           
static int icSigAToB0Tag
           
static int icSigAToB1Tag
           
static int icSigAToB2Tag
           
static int icSigBlueColorantTag
           
static int icSigBlueTRCTag
           
static int icSigBToA0Tag
           
static int icSigBToA1Tag
           
static int icSigBToA2Tag
           
static int icSigCalibrationDateTimeTag
           
static int icSigCharTargetTag
           
static int icSigCmyData
           
static int icSigCmykData
           
static int icSigColorSpaceClass
           
static int icSigCopyrightTag
           
static int icSigDeviceMfgDescTag
           
static int icSigDeviceModelDescTag
           
static int icSigDisplayClass
           
static int icSigGamutTag
           
static int icSigGrayData
           
static int icSigGrayTRCTag
           
static int icSigGreenColorantTag
           
static int icSigGreenTRCTag
           
static int icSigHead
           
static int icSigHlsData
           
static int icSigHsvData
           
static int icSigInputClass
           
static int icSigLabData
           
static int icSigLinkClass
           
static int icSigLuminanceTag
           
static int icSigLuvData
           
static int icSigMeasurementTag
           
static int icSigMediaBlackPointTag
           
static int icSigMediaWhitePointTag
           
static int icSigNamedColor2Tag
          .
static int icSigNamedColorClass
          .
static int icSigOutputClass
           
static int icSigPreview0Tag
           
static int icSigPreview1Tag
           
static int icSigPreview2Tag
           
static int icSigProfileDescriptionTag
           
static int icSigProfileSequenceDescTag
           
static int icSigPs2CRD0Tag
           
static int icSigPs2CRD1Tag
           
static int icSigPs2CRD2Tag
           
static int icSigPs2CRD3Tag
           
static int icSigPs2CSATag
           
static int icSigPs2RenderingIntentTag
           
static int icSigRedColorantTag
           
static int icSigRedTRCTag
           
static int icSigRgbData
           
static int icSigScreeningDescTag
           
static int icSigScreeningTag
           
static int icSigSpace2CLR
           
static int icSigSpace3CLR
           
static int icSigSpace4CLR
           
static int icSigSpace5CLR
           
static int icSigSpace6CLR
           
static int icSigSpace7CLR
           
static int icSigSpace8CLR
           
static int icSigSpace9CLR
           
static int icSigSpaceACLR
           
static int icSigSpaceBCLR
           
static int icSigSpaceCCLR
           
static int icSigSpaceDCLR
           
static int icSigSpaceECLR
           
static int icSigSpaceFCLR
          .
static int icSigTechnologyTag
           
static int icSigUcrBgTag
           
static int icSigViewingCondDescTag
           
static int icSigViewingConditionsTag
           
static int icSigXYZData
           
static int icSigYCbCrData
           
static int icSigYxyData
           
static int icTagReserved
           
static int icTagType
           
static int icXYZNumberX
           
 
Method Summary
protected  void finalize()
          Frees the resources associated with an ICC_Profile object.
 int getColorSpaceType()
          Returns the color space type.
 byte[] getData()
          Returns a byte array corresponding to the data of this ICC_Profile.
 byte[] getData(int tagSignature)
          Returns a particular tagged data element from the profile as a byte array.
static ICC_Profile getInstance(byte[] data)
          Constructs an ICC_Profile object corresponding to the data in a byte array.
static ICC_Profile getInstance(InputStream s)
          Constructs an ICC_Profile corresponding to the data in an InputStream.
static ICC_Profile getInstance(int cspace)
          Constructs an ICC_Profile corresponding to one of the specific color spaces defined by the ColorSpace class (for example CS_sRGB).
static ICC_Profile getInstance(String fileName)
          Constructs an ICC_Profile corresponding to the data in a file. fileName may be an absolute or a relative file specification.
 int getMajorVersion()
          Returns profile major version.
 int getMinorVersion()
          Returns profile minor version.
 int getNumComponents()
          Returns the number of color components in the "input" color space of this profile.
 int getPCSType()
          Returns the color space type of the Profile Connection Space (PCS).
 int getProfileClass()
          Returns the profile class.
 void setData(int tagSignature, byte[] tagData)
          Sets a particular tagged data element in the profile from a byte array.
 void write(OutputStream s)
          Write this ICC_Profile to an OutputStream.
 void write(String fileName)
          Write this ICC_Profile to a file.
 
Methods inherited from class java.lang.Object
clone , equals , getClass , hashCode , notify , notifyAll , toString , wait , wait , wait
 

Field Detail

CLASS_INPUT

public static final int CLASS_INPUT
Profile class is input.

CLASS_DISPLAY

public static final int CLASS_DISPLAY
Profile class is display.

CLASS_OUTPUT

public static final int CLASS_OUTPUT
Profile class is output.

CLASS_DEVICELINK

public static final int CLASS_DEVICELINK
Profile class is device link.

CLASS_COLORSPACECONVERSION

public static final int CLASS_COLORSPACECONVERSION
Profile class is color space conversion.

CLASS_ABSTRACT

public static final int CLASS_ABSTRACT
Profile class is abstract.

CLASS_NAMEDCOLOR

public static final int CLASS_NAMEDCOLOR
Profile class is named color.
 
 
ICC Color Space signatures.

icSigXYZData

public static final int icSigXYZData

icSigLabData

public static final int icSigLabData

icSigLuvData

public static final int icSigLuvData

icSigYCbCrData

public static final int icSigYCbCrData

icSigYxyData

public static final int icSigYxyData

icSigRgbData

public static final int icSigRgbData

icSigGrayData

public static final int icSigGrayData

icSigHsvData

public static final int icSigHsvData

icSigHlsData

public static final int icSigHlsData

icSigCmykData

public static final int icSigCmykData

icSigCmyData

public static final int icSigCmyData

icSigSpace2CLR

public static final int icSigSpace2CLR

icSigSpace3CLR

public static final int icSigSpace3CLR

icSigSpace4CLR

public static final int icSigSpace4CLR

icSigSpace5CLR

public static final int icSigSpace5CLR

icSigSpace6CLR

public static final int icSigSpace6CLR

icSigSpace7CLR

public static final int icSigSpace7CLR

icSigSpace8CLR

public static final int icSigSpace8CLR

icSigSpace9CLR

public static final int icSigSpace9CLR

icSigSpaceACLR

public static final int icSigSpaceACLR

icSigSpaceBCLR

public static final int icSigSpaceBCLR

icSigSpaceCCLR

public static final int icSigSpaceCCLR

icSigSpaceDCLR

public static final int icSigSpaceDCLR

icSigSpaceECLR

public static final int icSigSpaceECLR

icSigSpaceFCLR

public static final int icSigSpaceFCLR
.
 
 
ICC Profile Class signatures.

icSigInputClass

public static final int icSigInputClass

icSigDisplayClass

public static final int icSigDisplayClass

icSigOutputClass

public static final int icSigOutputClass

icSigLinkClass

public static final int icSigLinkClass

icSigAbstractClass

public static final int icSigAbstractClass

icSigColorSpaceClass

public static final int icSigColorSpaceClass

icSigNamedColorClass

public static final int icSigNamedColorClass
.
 
 
ICC rendering intents.

icPerceptual

public static final int icPerceptual

icRelativeColorimetric

public static final int icRelativeColorimetric

icSaturation

public static final int icSaturation

icAbsoluteColorimetric

public static final int icAbsoluteColorimetric
.
 
 
ICC Profile Tag signatures.

icSigHead

public static final int icSigHead

icSigAToB0Tag

public static final int icSigAToB0Tag

icSigAToB1Tag

public static final int icSigAToB1Tag

icSigAToB2Tag

public static final int icSigAToB2Tag

icSigBlueColorantTag

public static final int icSigBlueColorantTag

icSigBlueTRCTag

public static final int icSigBlueTRCTag

icSigBToA0Tag

public static final int icSigBToA0Tag

icSigBToA1Tag

public static final int icSigBToA1Tag

icSigBToA2Tag

public static final int icSigBToA2Tag

icSigCalibrationDateTimeTag

public static final int icSigCalibrationDateTimeTag

icSigCharTargetTag

public static final int icSigCharTargetTag

icSigCopyrightTag

public static final int icSigCopyrightTag

icSigDeviceMfgDescTag

public static final int icSigDeviceMfgDescTag

icSigDeviceModelDescTag

public static final int icSigDeviceModelDescTag

icSigGamutTag

public static final int icSigGamutTag

icSigGrayTRCTag

public static final int icSigGrayTRCTag

icSigGreenColorantTag

public static final int icSigGreenColorantTag

icSigGreenTRCTag

public static final int icSigGreenTRCTag

icSigLuminanceTag

public static final int icSigLuminanceTag

icSigMeasurementTag

public static final int icSigMeasurementTag

icSigMediaBlackPointTag

public static final int icSigMediaBlackPointTag

icSigMediaWhitePointTag

public static final int icSigMediaWhitePointTag

icSigPreview0Tag

public static final int icSigPreview0Tag

icSigPreview1Tag

public static final int icSigPreview1Tag

icSigPreview2Tag

public static final int icSigPreview2Tag

icSigProfileDescriptionTag

public static final int icSigProfileDescriptionTag

icSigProfileSequenceDescTag

public static final int icSigProfileSequenceDescTag

icSigPs2CRD0Tag

public static final int icSigPs2CRD0Tag

icSigPs2CRD1Tag

public static final int icSigPs2CRD1Tag

icSigPs2CRD2Tag

public static final int icSigPs2CRD2Tag

icSigPs2CRD3Tag

public static final int icSigPs2CRD3Tag

icSigPs2CSATag

public static final int icSigPs2CSATag

icSigPs2RenderingIntentTag

public static final int icSigPs2RenderingIntentTag

icSigRedColorantTag

public static final int icSigRedColorantTag

icSigRedTRCTag

public static final int icSigRedTRCTag

icSigScreeningDescTag

public static final int icSigScreeningDescTag

icSigScreeningTag

public static final int icSigScreeningTag

icSigTechnologyTag

public static final int icSigTechnologyTag

icSigUcrBgTag

public static final int icSigUcrBgTag

icSigViewingCondDescTag

public static final int icSigViewingCondDescTag

icSigViewingConditionsTag

public static final int icSigViewingConditionsTag

icSigNamedColor2Tag

public static final int icSigNamedColor2Tag
.
 
 
ICC Profile Header locations.

icHdrSize

public static final int icHdrSize

icHdrCmmId

public static final int icHdrCmmId

icHdrVersion

public static final int icHdrVersion

icHdrDeviceClass

public static final int icHdrDeviceClass

icHdrColorSpace

public static final int icHdrColorSpace

icHdrPcs

public static final int icHdrPcs

icHdrDate

public static final int icHdrDate

icHdrMagic

public static final int icHdrMagic

icHdrPlatform

public static final int icHdrPlatform

icHdrFlags

public static final int icHdrFlags

icHdrManufacturer

public static final int icHdrManufacturer

icHdrModel

public static final int icHdrModel

icHdrAttributes

public static final int icHdrAttributes

icHdrRenderingIntent

public static final int icHdrRenderingIntent

icHdrIlluminant

public static final int icHdrIlluminant

icHdrCreator

public static final int icHdrCreator
.
 
 
Other ICC constants.

icTagType

public static final int icTagType

icTagReserved

public static final int icTagReserved

icCurveCount

public static final int icCurveCount

icCurveData

public static final int icCurveData

icXYZNumberX

public static final int icXYZNumberX
Method Detail

finalize

protected void finalize()
Frees the resources associated with an ICC_Profile object.
Overrides:
finalize in class Object

getInstance

public static ICC_Profile getInstance(byte[] data)
Constructs an ICC_Profile object corresponding to the data in a byte array. Throws an IllegalArgumentException if the data does not correspond to a valid ICC Profile.

getInstance

public static ICC_Profile getInstance(int cspace)
Constructs an ICC_Profile corresponding to one of the specific color spaces defined by the ColorSpace class (for example CS_sRGB). Throws an IllegalArgumentException if cspace is not one of the defined color spaces.

getInstance

public static ICC_Profile getInstance(String fileName)
                               throws IOException
Constructs an ICC_Profile corresponding to the data in a file. fileName may be an absolute or a relative file specification. Relative file names are looked for in several places: first, relative to any directories specified by the java.iccprofile.path property; second, relative to any directories specified by the java.class.path property; finally, in a directory used to store profiles always available, such as the profile for sRGB. Built-in profiles use .pf as the file name extension for profiles, e.g. sRGB.pf. This method throws an IllegalArgumentException if the specified file cannot be opened or if it does not contain valid ICC Profile data. It throws an IOException if an I/O error occurs while reading the file.

getInstance

public static ICC_Profile getInstance(InputStream s)
                               throws IOException
Constructs an ICC_Profile corresponding to the data in an InputStream. This method throws an IllegalArgumentException if the stream does not contain valid ICC Profile data. It throws an IOException if an I/O error occurs while reading the stream.

getMajorVersion

public int getMajorVersion()
Returns profile major version.

getMinorVersion

public int getMinorVersion()
Returns profile minor version.

getProfileClass

public int getProfileClass()
Returns the profile class. Returns one of the predefined profile class constants.

getColorSpaceType

public int getColorSpaceType()
Returns the color space type. Returns one of the color space type constants defined by the ColorSpace class. This is the "input" color space of the profile. The type defines the number of components of the color space and the interpretation, e.g. TYPE_RGB identifies a color space with three components - red, green, and blue. It does not define the particular color characteristics of the space, e.g. the chromaticities of the primaries.

getPCSType

public int getPCSType()
Returns the color space type of the Profile Connection Space (PCS). Returns one of the color space type constants defined by the ColorSpace class. This is the "output" color space of the profile. For an input, display, or output profile useful for tagging colors or images, this will be either TYPE_XYZ or TYPE_Lab and should be interpreted as the corresponding specific color space defined in the ICC specification. For a device link profile, this could be any of the color space type constants.

write

public void write(String fileName)
           throws IOException
Write this ICC_Profile to a file. Throws an IOException if the file cannot be opened for writing or if an I/O error occurs while writing the file.

write

public void write(OutputStream s)
           throws IOException
Write this ICC_Profile to an OutputStream. Throws an IOException an I/O error occurs while writing the stream.

getData

public byte[] getData()
Returns a byte array corresponding to the data of this ICC_Profile.

getData

public byte[] getData(int tagSignature)
Returns a particular tagged data element from the profile as a byte array. Elements are identified by signatures as defined in the ICC specification. The signature icSigHead can be used to get the header. This method is useful for advanced applets or applications which need to access profile data directly. Returns null if no such tag exists.

setData

public void setData(int tagSignature,
                    byte[] tagData)
Sets a particular tagged data element in the profile from a byte array. This method is useful for advanced applets or applications which need to access profile data directly.

getNumComponents

public int getNumComponents()
Returns the number of color components in the "input" color space of this profile. For example if the color space type of this profile is TYPE_RGB, then this method will return 3.

Java Platform 1.2
Beta 4

Submit a bug or feature
Submit comments/suggestions about new javadoc look
Java is a trademark or registered trademark of Sun Microsystems, Inc. in the US and other countries.
Copyright 1993-1998 Sun Microsystems, Inc. 901 San Antonio Road,
Palo Alto, California, 94303, U.S.A. All Rights Reserved.
This documentation was generated with a post-Beta4 version of Javadoc.