JavaTM 2 Platform
Std. Ed. v1.3.1

java.awt.color
Class ICC_Profile

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

public class ICC_Profile
extends Object
implements Serializable

A representation of color profile data for device independent and device dependent color spaces based on the International Color Consortium Specification ICC.1:1998-09, File Format for Color Profiles, September 1998, and the addendum ICC.1A:1999-04, April 1999, to that specification (see http://www.color.org).

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, Serialized Form

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
          ICC Profile Rendering Intent: AbsoluteColorimetric.
static int icCurveCount
          ICC Profile Constant: curveType count.
static int icCurveData
          ICC Profile Constant: curveType data.
static int icHdrAttributes
          ICC Profile Header Location: device attributes.
static int icHdrCmmId
          ICC Profile Header Location: CMM for this profile.
static int icHdrColorSpace
          ICC Profile Header Location: color space of data.
static int icHdrCreator
          ICC Profile Header Location: profile creator.
static int icHdrDate
          ICC Profile Header Location: date profile was created.
static int icHdrDeviceClass
          ICC Profile Header Location: type of profile.
static int icHdrFlags
          ICC Profile Header Location: various bit settings.
static int icHdrIlluminant
          ICC Profile Header Location: profile illuminant.
static int icHdrMagic
          ICC Profile Header Location: icMagicNumber.
static int icHdrManufacturer
          ICC Profile Header Location: device manufacturer.
static int icHdrModel
          ICC Profile Header Location: device model number.
static int icHdrPcs
          ICC Profile Header Location: PCS - XYZ or Lab only.
static int icHdrPlatform
          ICC Profile Header Location: primary platform.
static int icHdrRenderingIntent
          ICC Profile Header Location: rendering intent.
static int icHdrSize
          ICC Profile Header Location: profile size in bytes.
static int icHdrVersion
          ICC Profile Header Location: format version number.
static int icPerceptual
          ICC Profile Rendering Intent: Perceptual.
static int icRelativeColorimetric
          ICC Profile Rendering Intent: RelativeColorimetric.
static int icSaturation
          ICC Profile Rendering Intent: Saturation.
static int icSigAbstractClass
          ICC Profile Class Signature: 'abst'.
static int icSigAToB0Tag
          ICC Profile Tag Signature: 'A2B0'.
static int icSigAToB1Tag
          ICC Profile Tag Signature: 'A2B1'.
static int icSigAToB2Tag
          ICC Profile Tag Signature: 'A2B2'.
static int icSigBlueColorantTag
          ICC Profile Tag Signature: 'bXYZ'.
static int icSigBlueTRCTag
          ICC Profile Tag Signature: 'bTRC'.
static int icSigBToA0Tag
          ICC Profile Tag Signature: 'B2A0'.
static int icSigBToA1Tag
          ICC Profile Tag Signature: 'B2A1'.
static int icSigBToA2Tag
          ICC Profile Tag Signature: 'B2A2'.
static int icSigCalibrationDateTimeTag
          ICC Profile Tag Signature: 'calt'.
static int icSigCharTargetTag
          ICC Profile Tag Signature: 'targ'.
static int icSigChromaticityTag
          ICC Profile Tag Signature: 'chrm'.
static int icSigCmyData
          ICC Profile Color Space Type Signature: 'CMY '.
static int icSigCmykData
          ICC Profile Color Space Type Signature: 'CMYK'.
static int icSigColorSpaceClass
          ICC Profile Class Signature: 'spac'.
static int icSigCopyrightTag
          ICC Profile Tag Signature: 'cprt'.
static int icSigCrdInfoTag
          ICC Profile Tag Signature: 'crdi'.
static int icSigDeviceMfgDescTag
          ICC Profile Tag Signature: 'dmnd'.
static int icSigDeviceModelDescTag
          ICC Profile Tag Signature: 'dmdd'.
static int icSigDeviceSettingsTag
          ICC Profile Tag Signature: 'devs'.
static int icSigDisplayClass
          ICC Profile Class Signature: 'mntr'.
static int icSigGamutTag
          ICC Profile Tag Signature: 'gamt'.
static int icSigGrayData
          ICC Profile Color Space Type Signature: 'GRAY'.
static int icSigGrayTRCTag
          ICC Profile Tag Signature: 'kTRC'.
static int icSigGreenColorantTag
          ICC Profile Tag Signature: 'gXYZ'.
static int icSigGreenTRCTag
          ICC Profile Tag Signature: 'gTRC'.
static int icSigHead
          ICC Profile Tag Signature: 'head' - special.
static int icSigHlsData
          ICC Profile Color Space Type Signature: 'HLS'.
static int icSigHsvData
          ICC Profile Color Space Type Signature: 'HSV'.
static int icSigInputClass
          ICC Profile Class Signature: 'scnr'.
static int icSigLabData
          ICC Profile Color Space Type Signature: 'Lab '.
static int icSigLinkClass
          ICC Profile Class Signature: 'link'.
static int icSigLuminanceTag
          ICC Profile Tag Signature: 'lumi'.
static int icSigLuvData
          ICC Profile Color Space Type Signature: 'Luv '.
static int icSigMeasurementTag
          ICC Profile Tag Signature: 'meas'.
static int icSigMediaBlackPointTag
          ICC Profile Tag Signature: 'bkpt'.
static int icSigMediaWhitePointTag
          ICC Profile Tag Signature: 'wtpt'.
static int icSigNamedColor2Tag
          ICC Profile Tag Signature: 'ncl2'.
static int icSigNamedColorClass
          ICC Profile Class Signature: 'nmcl'.
static int icSigOutputClass
          ICC Profile Class Signature: 'prtr'.
static int icSigOutputResponseTag
          ICC Profile Tag Signature: 'resp'.
static int icSigPreview0Tag
          ICC Profile Tag Signature: 'pre0'.
static int icSigPreview1Tag
          ICC Profile Tag Signature: 'pre1'.
static int icSigPreview2Tag
          ICC Profile Tag Signature: 'pre2'.
static int icSigProfileDescriptionTag
          ICC Profile Tag Signature: 'desc'.
static int icSigProfileSequenceDescTag
          ICC Profile Tag Signature: 'pseq'.
static int icSigPs2CRD0Tag
          ICC Profile Tag Signature: 'psd0'.
static int icSigPs2CRD1Tag
          ICC Profile Tag Signature: 'psd1'.
static int icSigPs2CRD2Tag
          ICC Profile Tag Signature: 'psd2'.
static int icSigPs2CRD3Tag
          ICC Profile Tag Signature: 'psd3'.
static int icSigPs2CSATag
          ICC Profile Tag Signature: 'ps2s'.
static int icSigPs2RenderingIntentTag
          ICC Profile Tag Signature: 'ps2i'.
static int icSigRedColorantTag
          ICC Profile Tag Signature: 'rXYZ'.
static int icSigRedTRCTag
          ICC Profile Tag Signature: 'rTRC'.
static int icSigRgbData
          ICC Profile Color Space Type Signature: 'RGB '.
static int icSigScreeningDescTag
          ICC Profile Tag Signature: 'scrd'.
static int icSigScreeningTag
          ICC Profile Tag Signature: 'scrn'.
static int icSigSpace2CLR
          ICC Profile Color Space Type Signature: '2CLR'.
static int icSigSpace3CLR
          ICC Profile Color Space Type Signature: '3CLR'.
static int icSigSpace4CLR
          ICC Profile Color Space Type Signature: '4CLR'.
static int icSigSpace5CLR
          ICC Profile Color Space Type Signature: '5CLR'.
static int icSigSpace6CLR
          ICC Profile Color Space Type Signature: '6CLR'.
static int icSigSpace7CLR
          ICC Profile Color Space Type Signature: '7CLR'.
static int icSigSpace8CLR
          ICC Profile Color Space Type Signature: '8CLR'.
static int icSigSpace9CLR
          ICC Profile Color Space Type Signature: '9CLR'.
static int icSigSpaceACLR
          ICC Profile Color Space Type Signature: 'ACLR'.
static int icSigSpaceBCLR
          ICC Profile Color Space Type Signature: 'BCLR'.
static int icSigSpaceCCLR
          ICC Profile Color Space Type Signature: 'CCLR'.
static int icSigSpaceDCLR
          ICC Profile Color Space Type Signature: 'DCLR'.
static int icSigSpaceECLR
          ICC Profile Color Space Type Signature: 'ECLR'.
static int icSigSpaceFCLR
          ICC Profile Color Space Type Signature: 'FCLR'.
static int icSigTechnologyTag
          ICC Profile Tag Signature: 'tech'.
static int icSigUcrBgTag
          ICC Profile Tag Signature: 'bfd '.
static int icSigViewingCondDescTag
          ICC Profile Tag Signature: 'vued'.
static int icSigViewingConditionsTag
          ICC Profile Tag Signature: 'view'.
static int icSigXYZData
          ICC Profile Color Space Type Signature: 'XYZ '.
static int icSigYCbCrData
          ICC Profile Color Space Type Signature: 'YCbr'.
static int icSigYxyData
          ICC Profile Color Space Type Signature: 'Yxy '.
static int icTagReserved
          ICC Profile Constant: reserved.
static int icTagType
          ICC Profile Constant: tag type signaturE.
static int icXYZNumberX
          ICC Profile Constant: XYZNumber X.
 
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.
 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.
protected  Object readResolve()
          Resolves instances being deserialized into instances registered with CMM.
 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.

icSigXYZData

public static final int icSigXYZData
ICC Profile Color Space Type Signature: 'XYZ '.

icSigLabData

public static final int icSigLabData
ICC Profile Color Space Type Signature: 'Lab '.

icSigLuvData

public static final int icSigLuvData
ICC Profile Color Space Type Signature: 'Luv '.

icSigYCbCrData

public static final int icSigYCbCrData
ICC Profile Color Space Type Signature: 'YCbr'.

icSigYxyData

public static final int icSigYxyData
ICC Profile Color Space Type Signature: 'Yxy '.

icSigRgbData

public static final int icSigRgbData
ICC Profile Color Space Type Signature: 'RGB '.

icSigGrayData

public static final int icSigGrayData
ICC Profile Color Space Type Signature: 'GRAY'.

icSigHsvData

public static final int icSigHsvData
ICC Profile Color Space Type Signature: 'HSV'.

icSigHlsData

public static final int icSigHlsData
ICC Profile Color Space Type Signature: 'HLS'.

icSigCmykData

public static final int icSigCmykData
ICC Profile Color Space Type Signature: 'CMYK'.

icSigCmyData

public static final int icSigCmyData
ICC Profile Color Space Type Signature: 'CMY '.

icSigSpace2CLR

public static final int icSigSpace2CLR
ICC Profile Color Space Type Signature: '2CLR'.

icSigSpace3CLR

public static final int icSigSpace3CLR
ICC Profile Color Space Type Signature: '3CLR'.

icSigSpace4CLR

public static final int icSigSpace4CLR
ICC Profile Color Space Type Signature: '4CLR'.

icSigSpace5CLR

public static final int icSigSpace5CLR
ICC Profile Color Space Type Signature: '5CLR'.

icSigSpace6CLR

public static final int icSigSpace6CLR
ICC Profile Color Space Type Signature: '6CLR'.

icSigSpace7CLR

public static final int icSigSpace7CLR
ICC Profile Color Space Type Signature: '7CLR'.

icSigSpace8CLR

public static final int icSigSpace8CLR
ICC Profile Color Space Type Signature: '8CLR'.

icSigSpace9CLR

public static final int icSigSpace9CLR
ICC Profile Color Space Type Signature: '9CLR'.

icSigSpaceACLR

public static final int icSigSpaceACLR
ICC Profile Color Space Type Signature: 'ACLR'.

icSigSpaceBCLR

public static final int icSigSpaceBCLR
ICC Profile Color Space Type Signature: 'BCLR'.

icSigSpaceCCLR

public static final int icSigSpaceCCLR
ICC Profile Color Space Type Signature: 'CCLR'.

icSigSpaceDCLR

public static final int icSigSpaceDCLR
ICC Profile Color Space Type Signature: 'DCLR'.

icSigSpaceECLR

public static final int icSigSpaceECLR
ICC Profile Color Space Type Signature: 'ECLR'.

icSigSpaceFCLR

public static final int icSigSpaceFCLR
ICC Profile Color Space Type Signature: 'FCLR'.

icSigInputClass

public static final int icSigInputClass
ICC Profile Class Signature: 'scnr'.

icSigDisplayClass

public static final int icSigDisplayClass
ICC Profile Class Signature: 'mntr'.

icSigOutputClass

public static final int icSigOutputClass
ICC Profile Class Signature: 'prtr'.

icSigLinkClass

public static final int icSigLinkClass
ICC Profile Class Signature: 'link'.

icSigAbstractClass

public static final int icSigAbstractClass
ICC Profile Class Signature: 'abst'.

icSigColorSpaceClass

public static final int icSigColorSpaceClass
ICC Profile Class Signature: 'spac'.

icSigNamedColorClass

public static final int icSigNamedColorClass
ICC Profile Class Signature: 'nmcl'.

icPerceptual

public static final int icPerceptual
ICC Profile Rendering Intent: Perceptual.

icRelativeColorimetric

public static final int icRelativeColorimetric
ICC Profile Rendering Intent: RelativeColorimetric.

icSaturation

public static final int icSaturation
ICC Profile Rendering Intent: Saturation.

icAbsoluteColorimetric

public static final int icAbsoluteColorimetric
ICC Profile Rendering Intent: AbsoluteColorimetric.

icSigHead

public static final int icSigHead
ICC Profile Tag Signature: 'head' - special.

icSigAToB0Tag

public static final int icSigAToB0Tag
ICC Profile Tag Signature: 'A2B0'.

icSigAToB1Tag

public static final int icSigAToB1Tag
ICC Profile Tag Signature: 'A2B1'.

icSigAToB2Tag

public static final int icSigAToB2Tag
ICC Profile Tag Signature: 'A2B2'.

icSigBlueColorantTag

public static final int icSigBlueColorantTag
ICC Profile Tag Signature: 'bXYZ'.

icSigBlueTRCTag

public static final int icSigBlueTRCTag
ICC Profile Tag Signature: 'bTRC'.

icSigBToA0Tag

public static final int icSigBToA0Tag
ICC Profile Tag Signature: 'B2A0'.

icSigBToA1Tag

public static final int icSigBToA1Tag
ICC Profile Tag Signature: 'B2A1'.

icSigBToA2Tag

public static final int icSigBToA2Tag
ICC Profile Tag Signature: 'B2A2'.

icSigCalibrationDateTimeTag

public static final int icSigCalibrationDateTimeTag
ICC Profile Tag Signature: 'calt'.

icSigCharTargetTag

public static final int icSigCharTargetTag
ICC Profile Tag Signature: 'targ'.

icSigCopyrightTag

public static final int icSigCopyrightTag
ICC Profile Tag Signature: 'cprt'.

icSigCrdInfoTag

public static final int icSigCrdInfoTag
ICC Profile Tag Signature: 'crdi'.

icSigDeviceMfgDescTag

public static final int icSigDeviceMfgDescTag
ICC Profile Tag Signature: 'dmnd'.

icSigDeviceModelDescTag

public static final int icSigDeviceModelDescTag
ICC Profile Tag Signature: 'dmdd'.

icSigDeviceSettingsTag

public static final int icSigDeviceSettingsTag
ICC Profile Tag Signature: 'devs'.

icSigGamutTag

public static final int icSigGamutTag
ICC Profile Tag Signature: 'gamt'.

icSigGrayTRCTag

public static final int icSigGrayTRCTag
ICC Profile Tag Signature: 'kTRC'.

icSigGreenColorantTag

public static final int icSigGreenColorantTag
ICC Profile Tag Signature: 'gXYZ'.

icSigGreenTRCTag

public static final int icSigGreenTRCTag
ICC Profile Tag Signature: 'gTRC'.

icSigLuminanceTag

public static final int icSigLuminanceTag
ICC Profile Tag Signature: 'lumi'.

icSigMeasurementTag

public static final int icSigMeasurementTag
ICC Profile Tag Signature: 'meas'.

icSigMediaBlackPointTag

public static final int icSigMediaBlackPointTag
ICC Profile Tag Signature: 'bkpt'.

icSigMediaWhitePointTag

public static final int icSigMediaWhitePointTag
ICC Profile Tag Signature: 'wtpt'.

icSigNamedColor2Tag

public static final int icSigNamedColor2Tag
ICC Profile Tag Signature: 'ncl2'.

icSigOutputResponseTag

public static final int icSigOutputResponseTag
ICC Profile Tag Signature: 'resp'.

icSigPreview0Tag

public static final int icSigPreview0Tag
ICC Profile Tag Signature: 'pre0'.

icSigPreview1Tag

public static final int icSigPreview1Tag
ICC Profile Tag Signature: 'pre1'.

icSigPreview2Tag

public static final int icSigPreview2Tag
ICC Profile Tag Signature: 'pre2'.

icSigProfileDescriptionTag

public static final int icSigProfileDescriptionTag
ICC Profile Tag Signature: 'desc'.

icSigProfileSequenceDescTag

public static final int icSigProfileSequenceDescTag
ICC Profile Tag Signature: 'pseq'.

icSigPs2CRD0Tag

public static final int icSigPs2CRD0Tag
ICC Profile Tag Signature: 'psd0'.

icSigPs2CRD1Tag

public static final int icSigPs2CRD1Tag
ICC Profile Tag Signature: 'psd1'.

icSigPs2CRD2Tag

public static final int icSigPs2CRD2Tag
ICC Profile Tag Signature: 'psd2'.

icSigPs2CRD3Tag

public static final int icSigPs2CRD3Tag
ICC Profile Tag Signature: 'psd3'.

icSigPs2CSATag

public static final int icSigPs2CSATag
ICC Profile Tag Signature: 'ps2s'.

icSigPs2RenderingIntentTag

public static final int icSigPs2RenderingIntentTag
ICC Profile Tag Signature: 'ps2i'.

icSigRedColorantTag

public static final int icSigRedColorantTag
ICC Profile Tag Signature: 'rXYZ'.

icSigRedTRCTag

public static final int icSigRedTRCTag
ICC Profile Tag Signature: 'rTRC'.

icSigScreeningDescTag

public static final int icSigScreeningDescTag
ICC Profile Tag Signature: 'scrd'.

icSigScreeningTag

public static final int icSigScreeningTag
ICC Profile Tag Signature: 'scrn'.

icSigTechnologyTag

public static final int icSigTechnologyTag
ICC Profile Tag Signature: 'tech'.

icSigUcrBgTag

public static final int icSigUcrBgTag
ICC Profile Tag Signature: 'bfd '.

icSigViewingCondDescTag

public static final int icSigViewingCondDescTag
ICC Profile Tag Signature: 'vued'.

icSigViewingConditionsTag

public static final int icSigViewingConditionsTag
ICC Profile Tag Signature: 'view'.

icSigChromaticityTag

public static final int icSigChromaticityTag
ICC Profile Tag Signature: 'chrm'.

icHdrSize

public static final int icHdrSize
ICC Profile Header Location: profile size in bytes.

icHdrCmmId

public static final int icHdrCmmId
ICC Profile Header Location: CMM for this profile.

icHdrVersion

public static final int icHdrVersion
ICC Profile Header Location: format version number.

icHdrDeviceClass

public static final int icHdrDeviceClass
ICC Profile Header Location: type of profile.

icHdrColorSpace

public static final int icHdrColorSpace
ICC Profile Header Location: color space of data.

icHdrPcs

public static final int icHdrPcs
ICC Profile Header Location: PCS - XYZ or Lab only.

icHdrDate

public static final int icHdrDate
ICC Profile Header Location: date profile was created.

icHdrMagic

public static final int icHdrMagic
ICC Profile Header Location: icMagicNumber.

icHdrPlatform

public static final int icHdrPlatform
ICC Profile Header Location: primary platform.

icHdrFlags

public static final int icHdrFlags
ICC Profile Header Location: various bit settings.

icHdrManufacturer

public static final int icHdrManufacturer
ICC Profile Header Location: device manufacturer.

icHdrModel

public static final int icHdrModel
ICC Profile Header Location: device model number.

icHdrAttributes

public static final int icHdrAttributes
ICC Profile Header Location: device attributes.

icHdrRenderingIntent

public static final int icHdrRenderingIntent
ICC Profile Header Location: rendering intent.

icHdrIlluminant

public static final int icHdrIlluminant
ICC Profile Header Location: profile illuminant.

icHdrCreator

public static final int icHdrCreator
ICC Profile Header Location: profile creator.

icTagType

public static final int icTagType
ICC Profile Constant: tag type signaturE.

icTagReserved

public static final int icTagReserved
ICC Profile Constant: reserved.

icCurveCount

public static final int icCurveCount
ICC Profile Constant: curveType count.

icCurveData

public static final int icCurveData
ICC Profile Constant: curveType data.

icXYZNumberX

public static final int icXYZNumberX
ICC Profile Constant: XYZNumber X.
Method Detail

finalize

protected void finalize()
Frees the resources associated with an ICC_Profile object.
Overrides:
finalize in class Object
Following copied from class: java.lang.Object
Throws:
Throwable - the Exception raised by this method

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 IOException if the specified file cannot be opened or if an I/O error occurs while reading the file. It throws an IllegalArgumentException if the file does not contain valid ICC Profile data.

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.

readResolve

protected Object readResolve()
                      throws ObjectStreamException
Resolves instances being deserialized into instances registered with CMM.
Returns:
ICC_Profile object for profile registered with CMM.
Throws:
ObjectStreamException - never thrown, but mandated by the serialization spec.

JavaTM 2 Platform
Std. Ed. v1.3.1

Submit a bug or feature
For further API reference and developer documentation, see Java 2 SDK SE Developer Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.

Java, Java 2D, and JDBC are trademarks or registered trademarks of Oracle and/or its affiliates, in the US and other countries.
Copyright © 1995, 2010 Oracle and/or its affiliates. All rights reserved.