public class

ICC_Profile

extends Object
implements Serializable
java.lang.Object
   ↳ java.awt.color.ICC_Profile
Known Direct Subclasses

Class Overview

A representation of color profile data for device independent and device dependent color spaces based on the International Color Consortium Specification ICC.1:2001-12, File Format for Color Profiles, (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

Summary

Constants
int CLASS_ABSTRACT Profile class is abstract.
int CLASS_COLORSPACECONVERSION Profile class is color space conversion.
int CLASS_DEVICELINK Profile class is device link.
int CLASS_DISPLAY Profile class is display.
int CLASS_INPUT Profile class is input.
int CLASS_NAMEDCOLOR Profile class is named color.
int CLASS_OUTPUT Profile class is output.
int icAbsoluteColorimetric ICC Profile Rendering Intent: AbsoluteColorimetric.
int icCurveCount ICC Profile Constant: curveType count.
int icCurveData ICC Profile Constant: curveType data.
int icHdrAttributes ICC Profile Header Location: device attributes.
int icHdrCmmId ICC Profile Header Location: CMM for this profile.
int icHdrColorSpace ICC Profile Header Location: color space of data.
int icHdrCreator ICC Profile Header Location: profile creator.
int icHdrDate ICC Profile Header Location: date profile was created.
int icHdrDeviceClass ICC Profile Header Location: type of profile.
int icHdrFlags ICC Profile Header Location: various bit settings.
int icHdrIlluminant ICC Profile Header Location: profile illuminant.
int icHdrMagic ICC Profile Header Location: icMagicNumber.
int icHdrManufacturer ICC Profile Header Location: device manufacturer.
int icHdrModel ICC Profile Header Location: device model number.
int icHdrPcs ICC Profile Header Location: PCS - XYZ or Lab only.
int icHdrPlatform ICC Profile Header Location: primary platform.
int icHdrProfileID ICC Profile Header Location: profile's ID.
int icHdrRenderingIntent ICC Profile Header Location: rendering intent.
int icHdrSize ICC Profile Header Location: profile size in bytes.
int icHdrVersion ICC Profile Header Location: format version number.
int icICCAbsoluteColorimetric ICC Profile Rendering Intent: ICC-AbsoluteColorimetric.
int icMediaRelativeColorimetric ICC Profile Rendering Intent: Media-RelativeColorimetric.
int icPerceptual ICC Profile Rendering Intent: Perceptual.
int icRelativeColorimetric ICC Profile Rendering Intent: RelativeColorimetric.
int icSaturation ICC Profile Rendering Intent: Saturation.
int icSigAToB0Tag ICC Profile Tag Signature: 'A2B0'.
int icSigAToB1Tag ICC Profile Tag Signature: 'A2B1'.
int icSigAToB2Tag ICC Profile Tag Signature: 'A2B2'.
int icSigAbstractClass ICC Profile Class Signature: 'abst'.
int icSigBToA0Tag ICC Profile Tag Signature: 'B2A0'.
int icSigBToA1Tag ICC Profile Tag Signature: 'B2A1'.
int icSigBToA2Tag ICC Profile Tag Signature: 'B2A2'.
int icSigBlueColorantTag ICC Profile Tag Signature: 'bXYZ'.
int icSigBlueMatrixColumnTag ICC Profile Tag Signature: 'bXYZ'.
int icSigBlueTRCTag ICC Profile Tag Signature: 'bTRC'.
int icSigCalibrationDateTimeTag ICC Profile Tag Signature: 'calt'.
int icSigCharTargetTag ICC Profile Tag Signature: 'targ'.
int icSigChromaticAdaptationTag ICC Profile Tag Signature: 'chad'.
int icSigChromaticityTag ICC Profile Tag Signature: 'chrm'.
int icSigCmyData ICC Profile Color Space Type Signature: 'CMY '.
int icSigCmykData ICC Profile Color Space Type Signature: 'CMYK'.
int icSigColorSpaceClass ICC Profile Class Signature: 'spac'.
int icSigColorantOrderTag ICC Profile Tag Signature: 'clro'.
int icSigColorantTableTag ICC Profile Tag Signature: 'clrt'.
int icSigCopyrightTag ICC Profile Tag Signature: 'cprt'.
int icSigCrdInfoTag ICC Profile Tag Signature: 'crdi'.
int icSigDeviceMfgDescTag ICC Profile Tag Signature: 'dmnd'.
int icSigDeviceModelDescTag ICC Profile Tag Signature: 'dmdd'.
int icSigDeviceSettingsTag ICC Profile Tag Signature: 'devs'.
int icSigDisplayClass ICC Profile Class Signature: 'mntr'.
int icSigGamutTag ICC Profile Tag Signature: 'gamt'.
int icSigGrayData ICC Profile Color Space Type Signature: 'GRAY'.
int icSigGrayTRCTag ICC Profile Tag Signature: 'kTRC'.
int icSigGreenColorantTag ICC Profile Tag Signature: 'gXYZ'.
int icSigGreenMatrixColumnTag ICC Profile Tag Signature: 'gXYZ'.
int icSigGreenTRCTag ICC Profile Tag Signature: 'gTRC'.
int icSigHead ICC Profile Tag Signature: 'head' - special.
int icSigHlsData ICC Profile Color Space Type Signature: 'HLS'.
int icSigHsvData ICC Profile Color Space Type Signature: 'HSV'.
int icSigInputClass ICC Profile Class Signature: 'scnr'.
int icSigLabData ICC Profile Color Space Type Signature: 'Lab '.
int icSigLinkClass ICC Profile Class Signature: 'link'.
int icSigLuminanceTag ICC Profile Tag Signature: 'lumi'.
int icSigLuvData ICC Profile Color Space Type Signature: 'Luv '.
int icSigMeasurementTag ICC Profile Tag Signature: 'meas'.
int icSigMediaBlackPointTag ICC Profile Tag Signature: 'bkpt'.
int icSigMediaWhitePointTag ICC Profile Tag Signature: 'wtpt'.
int icSigNamedColor2Tag ICC Profile Tag Signature: 'ncl2'.
int icSigNamedColorClass ICC Profile Class Signature: 'nmcl'.
int icSigOutputClass ICC Profile Class Signature: 'prtr'.
int icSigOutputResponseTag ICC Profile Tag Signature: 'resp'.
int icSigPreview0Tag ICC Profile Tag Signature: 'pre0'.
int icSigPreview1Tag ICC Profile Tag Signature: 'pre1'.
int icSigPreview2Tag ICC Profile Tag Signature: 'pre2'.
int icSigProfileDescriptionTag ICC Profile Tag Signature: 'desc'.
int icSigProfileSequenceDescTag ICC Profile Tag Signature: 'pseq'.
int icSigPs2CRD0Tag ICC Profile Tag Signature: 'psd0'.
int icSigPs2CRD1Tag ICC Profile Tag Signature: 'psd1'.
int icSigPs2CRD2Tag ICC Profile Tag Signature: 'psd2'.
int icSigPs2CRD3Tag ICC Profile Tag Signature: 'psd3'.
int icSigPs2CSATag ICC Profile Tag Signature: 'ps2s'.
int icSigPs2RenderingIntentTag ICC Profile Tag Signature: 'ps2i'.
int icSigRedColorantTag ICC Profile Tag Signature: 'rXYZ'.
int icSigRedMatrixColumnTag ICC Profile Tag Signature: 'rXYZ'.
int icSigRedTRCTag ICC Profile Tag Signature: 'rTRC'.
int icSigRgbData ICC Profile Color Space Type Signature: 'RGB '.
int icSigScreeningDescTag ICC Profile Tag Signature: 'scrd'.
int icSigScreeningTag ICC Profile Tag Signature: 'scrn'.
int icSigSpace2CLR ICC Profile Color Space Type Signature: '2CLR'.
int icSigSpace3CLR ICC Profile Color Space Type Signature: '3CLR'.
int icSigSpace4CLR ICC Profile Color Space Type Signature: '4CLR'.
int icSigSpace5CLR ICC Profile Color Space Type Signature: '5CLR'.
int icSigSpace6CLR ICC Profile Color Space Type Signature: '6CLR'.
int icSigSpace7CLR ICC Profile Color Space Type Signature: '7CLR'.
int icSigSpace8CLR ICC Profile Color Space Type Signature: '8CLR'.
int icSigSpace9CLR ICC Profile Color Space Type Signature: '9CLR'.
int icSigSpaceACLR ICC Profile Color Space Type Signature: 'ACLR'.
int icSigSpaceBCLR ICC Profile Color Space Type Signature: 'BCLR'.
int icSigSpaceCCLR ICC Profile Color Space Type Signature: 'CCLR'.
int icSigSpaceDCLR ICC Profile Color Space Type Signature: 'DCLR'.
int icSigSpaceECLR ICC Profile Color Space Type Signature: 'ECLR'.
int icSigSpaceFCLR ICC Profile Color Space Type Signature: 'FCLR'.
int icSigTechnologyTag ICC Profile Tag Signature: 'tech'.
int icSigUcrBgTag ICC Profile Tag Signature: 'bfd '.
int icSigViewingCondDescTag ICC Profile Tag Signature: 'vued'.
int icSigViewingConditionsTag ICC Profile Tag Signature: 'view'.
int icSigXYZData ICC Profile Color Space Type Signature: 'XYZ '.
int icSigYCbCrData ICC Profile Color Space Type Signature: 'YCbr'.
int icSigYxyData ICC Profile Color Space Type Signature: 'Yxy '.
int icTagReserved ICC Profile Constant: reserved.
int icTagType ICC Profile Constant: tag type signaturE.
int icXYZNumberX ICC Profile Constant: XYZNumber X.
Public Methods
int getColorSpaceType()
Returns the color space type.
byte[] getData(int tagSignature)
Returns a particular tagged data element from the profile as a byte array.
byte[] getData()
Returns a byte array corresponding to the data of this ICC_Profile.
static ICC_Profile getInstance(InputStream s)
Constructs an ICC_Profile corresponding to the data in an InputStream.
static ICC_Profile getInstance(byte[] data)
Constructs an ICC_Profile object corresponding to the data in a byte array.
static ICC_Profile getInstance(String fileName)
Constructs an ICC_Profile corresponding to the data in a file.
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).
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(String fileName)
Write this ICC_Profile to a file.
void write(OutputStream s)
Write this ICC_Profile to an OutputStream.
Protected Methods
void finalize()
Frees the resources associated with an ICC_Profile object.
Object readResolve()
Resolves instances being deserialized into instances registered with CMM.
[Expand]
Inherited Methods
From class java.lang.Object

Constants

public static final int CLASS_ABSTRACT

Profile class is abstract.

Constant Value: 5 (0x00000005)

public static final int CLASS_COLORSPACECONVERSION

Profile class is color space conversion.

Constant Value: 4 (0x00000004)

public static final int CLASS_DEVICELINK

Profile class is device link.

Constant Value: 3 (0x00000003)

public static final int CLASS_DISPLAY

Profile class is display.

Constant Value: 1 (0x00000001)

public static final int CLASS_INPUT

Profile class is input.

Constant Value: 0 (0x00000000)

public static final int CLASS_NAMEDCOLOR

Profile class is named color.

Constant Value: 6 (0x00000006)

public static final int CLASS_OUTPUT

Profile class is output.

Constant Value: 2 (0x00000002)

public static final int icAbsoluteColorimetric

ICC Profile Rendering Intent: AbsoluteColorimetric.

Constant Value: 3 (0x00000003)

public static final int icCurveCount

ICC Profile Constant: curveType count.

Constant Value: 8 (0x00000008)

public static final int icCurveData

ICC Profile Constant: curveType data.

Constant Value: 12 (0x0000000c)

public static final int icHdrAttributes

ICC Profile Header Location: device attributes.

Constant Value: 56 (0x00000038)

public static final int icHdrCmmId

ICC Profile Header Location: CMM for this profile.

Constant Value: 4 (0x00000004)

public static final int icHdrColorSpace

ICC Profile Header Location: color space of data.

Constant Value: 16 (0x00000010)

public static final int icHdrCreator

ICC Profile Header Location: profile creator.

Constant Value: 80 (0x00000050)

public static final int icHdrDate

ICC Profile Header Location: date profile was created.

Constant Value: 24 (0x00000018)

public static final int icHdrDeviceClass

ICC Profile Header Location: type of profile.

Constant Value: 12 (0x0000000c)

public static final int icHdrFlags

ICC Profile Header Location: various bit settings.

Constant Value: 44 (0x0000002c)

public static final int icHdrIlluminant

ICC Profile Header Location: profile illuminant.

Constant Value: 68 (0x00000044)

public static final int icHdrMagic

ICC Profile Header Location: icMagicNumber.

Constant Value: 36 (0x00000024)

public static final int icHdrManufacturer

ICC Profile Header Location: device manufacturer.

Constant Value: 48 (0x00000030)

public static final int icHdrModel

ICC Profile Header Location: device model number.

Constant Value: 52 (0x00000034)

public static final int icHdrPcs

ICC Profile Header Location: PCS - XYZ or Lab only.

Constant Value: 20 (0x00000014)

public static final int icHdrPlatform

ICC Profile Header Location: primary platform.

Constant Value: 40 (0x00000028)

public static final int icHdrProfileID

ICC Profile Header Location: profile's ID.

Constant Value: 84 (0x00000054)

public static final int icHdrRenderingIntent

ICC Profile Header Location: rendering intent.

Constant Value: 64 (0x00000040)

public static final int icHdrSize

ICC Profile Header Location: profile size in bytes.

Constant Value: 0 (0x00000000)

public static final int icHdrVersion

ICC Profile Header Location: format version number.

Constant Value: 8 (0x00000008)

public static final int icICCAbsoluteColorimetric

ICC Profile Rendering Intent: ICC-AbsoluteColorimetric.

Constant Value: 3 (0x00000003)

public static final int icMediaRelativeColorimetric

ICC Profile Rendering Intent: Media-RelativeColorimetric.

Constant Value: 1 (0x00000001)

public static final int icPerceptual

ICC Profile Rendering Intent: Perceptual.

Constant Value: 0 (0x00000000)

public static final int icRelativeColorimetric

ICC Profile Rendering Intent: RelativeColorimetric.

Constant Value: 1 (0x00000001)

public static final int icSaturation

ICC Profile Rendering Intent: Saturation.

Constant Value: 2 (0x00000002)

public static final int icSigAToB0Tag

ICC Profile Tag Signature: 'A2B0'.

Constant Value: 1093812784 (0x41324230)

public static final int icSigAToB1Tag

ICC Profile Tag Signature: 'A2B1'.

Constant Value: 1093812785 (0x41324231)

public static final int icSigAToB2Tag

ICC Profile Tag Signature: 'A2B2'.

Constant Value: 1093812786 (0x41324232)

public static final int icSigAbstractClass

ICC Profile Class Signature: 'abst'.

Constant Value: 1633842036 (0x61627374)

public static final int icSigBToA0Tag

ICC Profile Tag Signature: 'B2A0'.

Constant Value: 1110589744 (0x42324130)

public static final int icSigBToA1Tag

ICC Profile Tag Signature: 'B2A1'.

Constant Value: 1110589745 (0x42324131)

public static final int icSigBToA2Tag

ICC Profile Tag Signature: 'B2A2'.

Constant Value: 1110589746 (0x42324132)

public static final int icSigBlueColorantTag

ICC Profile Tag Signature: 'bXYZ'.

Constant Value: 1649957210 (0x6258595a)

public static final int icSigBlueMatrixColumnTag

ICC Profile Tag Signature: 'bXYZ'.

Constant Value: 1649957210 (0x6258595a)

public static final int icSigBlueTRCTag

ICC Profile Tag Signature: 'bTRC'.

Constant Value: 1649693251 (0x62545243)

public static final int icSigCalibrationDateTimeTag

ICC Profile Tag Signature: 'calt'.

Constant Value: 1667329140 (0x63616c74)

public static final int icSigCharTargetTag

ICC Profile Tag Signature: 'targ'.

Constant Value: 1952543335 (0x74617267)

public static final int icSigChromaticAdaptationTag

ICC Profile Tag Signature: 'chad'.

Constant Value: 1667785060 (0x63686164)

public static final int icSigChromaticityTag

ICC Profile Tag Signature: 'chrm'.

Constant Value: 1667789421 (0x6368726d)

public static final int icSigCmyData

ICC Profile Color Space Type Signature: 'CMY '.

Constant Value: 1129142560 (0x434d5920)

public static final int icSigCmykData

ICC Profile Color Space Type Signature: 'CMYK'.

Constant Value: 1129142603 (0x434d594b)

public static final int icSigColorSpaceClass

ICC Profile Class Signature: 'spac'.

Constant Value: 1936744803 (0x73706163)

public static final int icSigColorantOrderTag

ICC Profile Tag Signature: 'clro'.

Constant Value: 1668051567 (0x636c726f)

public static final int icSigColorantTableTag

ICC Profile Tag Signature: 'clrt'.

Constant Value: 1668051572 (0x636c7274)

public static final int icSigCopyrightTag

ICC Profile Tag Signature: 'cprt'.

Constant Value: 1668313716 (0x63707274)

public static final int icSigCrdInfoTag

ICC Profile Tag Signature: 'crdi'.

Constant Value: 1668441193 (0x63726469)

public static final int icSigDeviceMfgDescTag

ICC Profile Tag Signature: 'dmnd'.

Constant Value: 1684893284 (0x646d6e64)

public static final int icSigDeviceModelDescTag

ICC Profile Tag Signature: 'dmdd'.

Constant Value: 1684890724 (0x646d6464)

public static final int icSigDeviceSettingsTag

ICC Profile Tag Signature: 'devs'.

Constant Value: 1684371059 (0x64657673)

public static final int icSigDisplayClass

ICC Profile Class Signature: 'mntr'.

Constant Value: 1835955314 (0x6d6e7472)

public static final int icSigGamutTag

ICC Profile Tag Signature: 'gamt'.

Constant Value: 1734438260 (0x67616d74)

public static final int icSigGrayData

ICC Profile Color Space Type Signature: 'GRAY'.

Constant Value: 1196573017 (0x47524159)

public static final int icSigGrayTRCTag

ICC Profile Tag Signature: 'kTRC'.

Constant Value: 1800688195 (0x6b545243)

public static final int icSigGreenColorantTag

ICC Profile Tag Signature: 'gXYZ'.

Constant Value: 1733843290 (0x6758595a)

public static final int icSigGreenMatrixColumnTag

ICC Profile Tag Signature: 'gXYZ'.

Constant Value: 1733843290 (0x6758595a)

public static final int icSigGreenTRCTag

ICC Profile Tag Signature: 'gTRC'.

Constant Value: 1733579331 (0x67545243)

public static final int icSigHead

ICC Profile Tag Signature: 'head' - special.

Constant Value: 1751474532 (0x68656164)

public static final int icSigHlsData

ICC Profile Color Space Type Signature: 'HLS'.

Constant Value: 1212961568 (0x484c5320)

public static final int icSigHsvData

ICC Profile Color Space Type Signature: 'HSV'.

Constant Value: 1213421088 (0x48535620)

public static final int icSigInputClass

ICC Profile Class Signature: 'scnr'.

Constant Value: 1935896178 (0x73636e72)

public static final int icSigLabData

ICC Profile Color Space Type Signature: 'Lab '.

Constant Value: 1281450528 (0x4c616220)

public static final int icSigLinkClass

ICC Profile Class Signature: 'link'.

Constant Value: 1818848875 (0x6c696e6b)

public static final int icSigLuminanceTag

ICC Profile Tag Signature: 'lumi'.

Constant Value: 1819635049 (0x6c756d69)

public static final int icSigLuvData

ICC Profile Color Space Type Signature: 'Luv '.

Constant Value: 1282766368 (0x4c757620)

public static final int icSigMeasurementTag

ICC Profile Tag Signature: 'meas'.

Constant Value: 1835360627 (0x6d656173)

public static final int icSigMediaBlackPointTag

ICC Profile Tag Signature: 'bkpt'.

Constant Value: 1651208308 (0x626b7074)

public static final int icSigMediaWhitePointTag

ICC Profile Tag Signature: 'wtpt'.

Constant Value: 2004119668 (0x77747074)

public static final int icSigNamedColor2Tag

ICC Profile Tag Signature: 'ncl2'.

Constant Value: 1852009522 (0x6e636c32)

public static final int icSigNamedColorClass

ICC Profile Class Signature: 'nmcl'.

Constant Value: 1852662636 (0x6e6d636c)

public static final int icSigOutputClass

ICC Profile Class Signature: 'prtr'.

Constant Value: 1886549106 (0x70727472)

public static final int icSigOutputResponseTag

ICC Profile Tag Signature: 'resp'.

Constant Value: 1919251312 (0x72657370)

public static final int icSigPreview0Tag

ICC Profile Tag Signature: 'pre0'.

Constant Value: 1886545200 (0x70726530)

public static final int icSigPreview1Tag

ICC Profile Tag Signature: 'pre1'.

Constant Value: 1886545201 (0x70726531)

public static final int icSigPreview2Tag

ICC Profile Tag Signature: 'pre2'.

Constant Value: 1886545202 (0x70726532)

public static final int icSigProfileDescriptionTag

ICC Profile Tag Signature: 'desc'.

Constant Value: 1684370275 (0x64657363)

public static final int icSigProfileSequenceDescTag

ICC Profile Tag Signature: 'pseq'.

Constant Value: 1886610801 (0x70736571)

public static final int icSigPs2CRD0Tag

ICC Profile Tag Signature: 'psd0'.

Constant Value: 1886610480 (0x70736430)

public static final int icSigPs2CRD1Tag

ICC Profile Tag Signature: 'psd1'.

Constant Value: 1886610481 (0x70736431)

public static final int icSigPs2CRD2Tag

ICC Profile Tag Signature: 'psd2'.

Constant Value: 1886610482 (0x70736432)

public static final int icSigPs2CRD3Tag

ICC Profile Tag Signature: 'psd3'.

Constant Value: 1886610483 (0x70736433)

public static final int icSigPs2CSATag

ICC Profile Tag Signature: 'ps2s'.

Constant Value: 1886597747 (0x70733273)

public static final int icSigPs2RenderingIntentTag

ICC Profile Tag Signature: 'ps2i'.

Constant Value: 1886597737 (0x70733269)

public static final int icSigRedColorantTag

ICC Profile Tag Signature: 'rXYZ'.

Constant Value: 1918392666 (0x7258595a)

public static final int icSigRedMatrixColumnTag

ICC Profile Tag Signature: 'rXYZ'.

Constant Value: 1918392666 (0x7258595a)

public static final int icSigRedTRCTag

ICC Profile Tag Signature: 'rTRC'.

Constant Value: 1918128707 (0x72545243)

public static final int icSigRgbData

ICC Profile Color Space Type Signature: 'RGB '.

Constant Value: 1380401696 (0x52474220)

public static final int icSigScreeningDescTag

ICC Profile Tag Signature: 'scrd'.

Constant Value: 1935897188 (0x73637264)

public static final int icSigScreeningTag

ICC Profile Tag Signature: 'scrn'.

Constant Value: 1935897198 (0x7363726e)

public static final int icSigSpace2CLR

ICC Profile Color Space Type Signature: '2CLR'.

Constant Value: 843271250 (0x32434c52)

public static final int icSigSpace3CLR

ICC Profile Color Space Type Signature: '3CLR'.

Constant Value: 860048466 (0x33434c52)

public static final int icSigSpace4CLR

ICC Profile Color Space Type Signature: '4CLR'.

Constant Value: 876825682 (0x34434c52)

public static final int icSigSpace5CLR

ICC Profile Color Space Type Signature: '5CLR'.

Constant Value: 893602898 (0x35434c52)

public static final int icSigSpace6CLR

ICC Profile Color Space Type Signature: '6CLR'.

Constant Value: 910380114 (0x36434c52)

public static final int icSigSpace7CLR

ICC Profile Color Space Type Signature: '7CLR'.

Constant Value: 927157330 (0x37434c52)

public static final int icSigSpace8CLR

ICC Profile Color Space Type Signature: '8CLR'.

Constant Value: 943934546 (0x38434c52)

public static final int icSigSpace9CLR

ICC Profile Color Space Type Signature: '9CLR'.

Constant Value: 960711762 (0x39434c52)

public static final int icSigSpaceACLR

ICC Profile Color Space Type Signature: 'ACLR'.

Constant Value: 1094929490 (0x41434c52)

public static final int icSigSpaceBCLR

ICC Profile Color Space Type Signature: 'BCLR'.

Constant Value: 1111706706 (0x42434c52)

public static final int icSigSpaceCCLR

ICC Profile Color Space Type Signature: 'CCLR'.

Constant Value: 1128483922 (0x43434c52)

public static final int icSigSpaceDCLR

ICC Profile Color Space Type Signature: 'DCLR'.

Constant Value: 1145261138 (0x44434c52)

public static final int icSigSpaceECLR

ICC Profile Color Space Type Signature: 'ECLR'.

Constant Value: 1162038354 (0x45434c52)

public static final int icSigSpaceFCLR

ICC Profile Color Space Type Signature: 'FCLR'.

Constant Value: 1178815570 (0x46434c52)

public static final int icSigTechnologyTag

ICC Profile Tag Signature: 'tech'.

Constant Value: 1952801640 (0x74656368)

public static final int icSigUcrBgTag

ICC Profile Tag Signature: 'bfd '.

Constant Value: 1650877472 (0x62666420)

public static final int icSigViewingCondDescTag

ICC Profile Tag Signature: 'vued'.

Constant Value: 1987405156 (0x76756564)

public static final int icSigViewingConditionsTag

ICC Profile Tag Signature: 'view'.

Constant Value: 1986618743 (0x76696577)

public static final int icSigXYZData

ICC Profile Color Space Type Signature: 'XYZ '.

Constant Value: 1482250784 (0x58595a20)

public static final int icSigYCbCrData

ICC Profile Color Space Type Signature: 'YCbr'.

Constant Value: 1497588338 (0x59436272)

public static final int icSigYxyData

ICC Profile Color Space Type Signature: 'Yxy '.

Constant Value: 1501067552 (0x59787920)

public static final int icTagReserved

ICC Profile Constant: reserved.

Constant Value: 4 (0x00000004)

public static final int icTagType

ICC Profile Constant: tag type signaturE.

Constant Value: 0 (0x00000000)

public static final int icXYZNumberX

ICC Profile Constant: XYZNumber X.

Constant Value: 8 (0x00000008)

Public Methods

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.

Returns
  • One of the color space type constants defined in the ColorSpace class.

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.

Parameters
tagSignature The ICC tag signature for the data element you want to get.
Returns
  • A byte array that contains the tagged data element. Returns null if the specified tag doesn't exist.

public byte[] getData ()

Returns a byte array corresponding to the data of this ICC_Profile.

Returns
  • A byte array that contains the profile data.

public static ICC_Profile getInstance (InputStream s)

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.

Parameters
s The input stream from which to read the profile data.
Returns
  • an ICC_Profile object corresponding to the data in the specified InputStream.
Throws
IOException If an I/O error occurs while reading the stream.
IllegalArgumentException If the stream does not contain valid ICC Profile data.

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.

Parameters
data the specified ICC Profile data
Returns
  • an ICC_Profile object corresponding to the data in the specified data array.

public 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. 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.

Parameters
fileName The file that contains the data for the profile.
Returns
  • an ICC_Profile object corresponding to the data in the specified file.
Throws
IOException If the specified file cannot be opened or an I/O error occurs while reading the file.
IllegalArgumentException If the file does not contain valid ICC Profile data.
SecurityException If a security manager is installed and it does not permit read access to the given file.

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.

Parameters
cspace the type of color space to create a profile for. The specified type is one of the color space constants defined in the ColorSpace class.
Returns
  • an ICC_Profile object corresponding to the specified ColorSpace type.
Throws
IllegalArgumentException If cspace is not one of the predefined color space types.

public int getMajorVersion ()

Returns profile major version.

Returns
  • The major version of the profile.

public int getMinorVersion ()

Returns profile minor version.

Returns
  • The minor version of the profile.

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.

Returns
  • The number of color components in the profile's input color space.
Throws
ProfileDataException if color space is in the profile is invalid

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.

Returns
  • One of the color space type constants defined in the ColorSpace class.

public int getProfileClass ()

Returns the profile class.

Returns
  • One of the predefined profile class constants.

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.

Parameters
tagSignature The ICC tag signature for the data element you want to set.
tagData the data to set for the specified tag signature
See Also

public void write (String fileName)

Write this ICC_Profile to a file.

Parameters
fileName The file to write the profile data to.
Throws
IOException If the file cannot be opened for writing or an I/O error occurs while writing to the file.

public void write (OutputStream s)

Write this ICC_Profile to an OutputStream.

Parameters
s The stream to write the profile data to.
Throws
IOException If an I/O error occurs while writing to the stream.

Protected Methods

protected void finalize ()

Frees the resources associated with an ICC_Profile object.

protected Object readResolve ()

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.