- All Implemented Interfaces:
Serializable
- Direct Known Subclasses:
ICC_ProfileGray
,ICC_ProfileRGB
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:
-
Field Summary
Modifier and TypeFieldDescriptionstatic final int
Profile class is abstract.static final int
Profile class is color space conversion.static final int
Profile class is device link.static final int
Profile class is display.static final int
Profile class is input.static final int
Profile class is named color.static final int
Profile class is output.static final int
ICC Profile Rendering Intent: AbsoluteColorimetric.static final int
ICC Profile Constant: curveType count.static final int
ICC Profile Constant: curveType data.static final int
ICC Profile Header Location: device attributes.static final int
ICC Profile Header Location: CMM for this profile.static final int
ICC Profile Header Location: color space of data.static final int
ICC Profile Header Location: profile creator.static final int
ICC Profile Header Location: date profile was created.static final int
ICC Profile Header Location: type of profile.static final int
ICC Profile Header Location: various bit settings.static final int
ICC Profile Header Location: profile illuminant.static final int
ICC Profile Header Location: icMagicNumber.static final int
ICC Profile Header Location: device manufacturer.static final int
ICC Profile Header Location: device model number.static final int
ICC Profile Header Location: PCS - XYZ or Lab only.static final int
ICC Profile Header Location: primary platform.static final int
ICC Profile Header Location: profile's ID.static final int
ICC Profile Header Location: rendering intent.static final int
ICC Profile Header Location: profile size in bytes.static final int
ICC Profile Header Location: format version number.static final int
ICC Profile Rendering Intent: ICC-AbsoluteColorimetric.static final int
ICC Profile Rendering Intent: Media-RelativeColorimetric.static final int
ICC Profile Rendering Intent: Perceptual.static final int
ICC Profile Rendering Intent: RelativeColorimetric.static final int
ICC Profile Rendering Intent: Saturation.static final int
ICC Profile Class Signature: 'abst'.static final int
ICC Profile Tag Signature: 'A2B0'.static final int
ICC Profile Tag Signature: 'A2B1'.static final int
ICC Profile Tag Signature: 'A2B2'.static final int
ICC Profile Tag Signature: 'bXYZ'.static final int
ICC Profile Tag Signature: 'bXYZ'.static final int
ICC Profile Tag Signature: 'bTRC'.static final int
ICC Profile Tag Signature: 'B2A0'.static final int
ICC Profile Tag Signature: 'B2A1'.static final int
ICC Profile Tag Signature: 'B2A2'.static final int
ICC Profile Tag Signature: 'calt'.static final int
ICC Profile Tag Signature: 'targ'.static final int
ICC Profile Tag Signature: 'chad'.static final int
ICC Profile Tag Signature: 'chrm'.static final int
ICC Profile Color Space Type Signature: 'CMY '.static final int
ICC Profile Color Space Type Signature: 'CMYK'.static final int
ICC Profile Tag Signature: 'clro'.static final int
ICC Profile Tag Signature: 'clrt'.static final int
ICC Profile Class Signature: 'spac'.static final int
ICC Profile Tag Signature: 'cprt'.static final int
ICC Profile Tag Signature: 'crdi'.static final int
ICC Profile Tag Signature: 'dmnd'.static final int
ICC Profile Tag Signature: 'dmdd'.static final int
ICC Profile Tag Signature: 'devs'.static final int
ICC Profile Class Signature: 'mntr'.static final int
ICC Profile Tag Signature: 'gamt'.static final int
ICC Profile Color Space Type Signature: 'GRAY'.static final int
ICC Profile Tag Signature: 'kTRC'.static final int
ICC Profile Tag Signature: 'gXYZ'.static final int
ICC Profile Tag Signature: 'gXYZ'.static final int
ICC Profile Tag Signature: 'gTRC'.static final int
ICC Profile Tag Signature: 'head' - special.static final int
ICC Profile Color Space Type Signature: 'HLS'.static final int
ICC Profile Color Space Type Signature: 'HSV'.static final int
ICC Profile Class Signature: 'scnr'.static final int
ICC Profile Color Space Type Signature: 'Lab '.static final int
ICC Profile Class Signature: 'link'.static final int
ICC Profile Tag Signature: 'lumi'.static final int
ICC Profile Color Space Type Signature: 'Luv '.static final int
ICC Profile Tag Signature: 'meas'.static final int
ICC Profile Tag Signature: 'bkpt'.static final int
ICC Profile Tag Signature: 'wtpt'.static final int
ICC Profile Tag Signature: 'ncl2'.static final int
ICC Profile Class Signature: 'nmcl'.static final int
ICC Profile Class Signature: 'prtr'.static final int
ICC Profile Tag Signature: 'resp'.static final int
ICC Profile Tag Signature: 'pre0'.static final int
ICC Profile Tag Signature: 'pre1'.static final int
ICC Profile Tag Signature: 'pre2'.static final int
ICC Profile Tag Signature: 'desc'.static final int
ICC Profile Tag Signature: 'pseq'.static final int
ICC Profile Tag Signature: 'psd0'.static final int
ICC Profile Tag Signature: 'psd1'.static final int
ICC Profile Tag Signature: 'psd2'.static final int
ICC Profile Tag Signature: 'psd3'.static final int
ICC Profile Tag Signature: 'ps2s'.static final int
ICC Profile Tag Signature: 'ps2i'.static final int
ICC Profile Tag Signature: 'rXYZ'.static final int
ICC Profile Tag Signature: 'rXYZ'.static final int
ICC Profile Tag Signature: 'rTRC'.static final int
ICC Profile Color Space Type Signature: 'RGB '.static final int
ICC Profile Tag Signature: 'scrd'.static final int
ICC Profile Tag Signature: 'scrn'.static final int
ICC Profile Color Space Type Signature: '2CLR'.static final int
ICC Profile Color Space Type Signature: '3CLR'.static final int
ICC Profile Color Space Type Signature: '4CLR'.static final int
ICC Profile Color Space Type Signature: '5CLR'.static final int
ICC Profile Color Space Type Signature: '6CLR'.static final int
ICC Profile Color Space Type Signature: '7CLR'.static final int
ICC Profile Color Space Type Signature: '8CLR'.static final int
ICC Profile Color Space Type Signature: '9CLR'.static final int
ICC Profile Color Space Type Signature: 'ACLR'.static final int
ICC Profile Color Space Type Signature: 'BCLR'.static final int
ICC Profile Color Space Type Signature: 'CCLR'.static final int
ICC Profile Color Space Type Signature: 'DCLR'.static final int
ICC Profile Color Space Type Signature: 'ECLR'.static final int
ICC Profile Color Space Type Signature: 'FCLR'.static final int
ICC Profile Tag Signature: 'tech'.static final int
ICC Profile Tag Signature: 'bfd '.static final int
ICC Profile Tag Signature: 'vued'.static final int
ICC Profile Tag Signature: 'view'.static final int
ICC Profile Color Space Type Signature: 'XYZ '.static final int
ICC Profile Color Space Type Signature: 'YCbr'.static final int
ICC Profile Color Space Type Signature: 'Yxy '.static final int
ICC Profile Constant: reserved.static final int
ICC Profile Constant: tag type signature.static final int
ICC Profile Constant: XYZNumber X. -
Method Summary
Modifier and TypeMethodDescriptionprotected void
finalize()
Deprecated, for removal: This API element is subject to removal in a future version.int
Returns the color space type.byte[]
getData()
Returns a byte array corresponding to the data of thisICC_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 anICC_Profile
object corresponding to the data in a byte array.static ICC_Profile
getInstance
(int cspace) Constructs anICC_Profile
corresponding to one of the specific color spaces defined by theColorSpace
class (for exampleCS_sRGB
).static ICC_Profile
Constructs anICC_Profile
corresponding to the data in anInputStream
.static ICC_Profile
getInstance
(String fileName) Constructs anICC_Profile
corresponding to the data in a file.int
Returns profile major version.int
Returns profile minor version.int
Returns the number of color components in the "input" color space of this profile.int
Returns the color space type of the Profile Connection Space (PCS).int
Returns the profile class.protected Object
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 thisICC_Profile
to anOutputStream
.void
Write thisICC_Profile
to a file.
-
Field Details
-
CLASS_INPUT
public static final int CLASS_INPUTProfile class is input.- See Also:
-
CLASS_DISPLAY
public static final int CLASS_DISPLAYProfile class is display.- See Also:
-
CLASS_OUTPUT
public static final int CLASS_OUTPUTProfile class is output.- See Also:
-
CLASS_DEVICELINK
public static final int CLASS_DEVICELINKProfile class is device link.- See Also:
-
CLASS_COLORSPACECONVERSION
public static final int CLASS_COLORSPACECONVERSIONProfile class is color space conversion.- See Also:
-
CLASS_ABSTRACT
public static final int CLASS_ABSTRACTProfile class is abstract.- See Also:
-
CLASS_NAMEDCOLOR
public static final int CLASS_NAMEDCOLORProfile class is named color.- See Also:
-
icSigXYZData
public static final int icSigXYZDataICC Profile Color Space Type Signature: 'XYZ '.- See Also:
-
icSigLabData
public static final int icSigLabDataICC Profile Color Space Type Signature: 'Lab '.- See Also:
-
icSigLuvData
public static final int icSigLuvDataICC Profile Color Space Type Signature: 'Luv '.- See Also:
-
icSigYCbCrData
public static final int icSigYCbCrDataICC Profile Color Space Type Signature: 'YCbr'.- See Also:
-
icSigYxyData
public static final int icSigYxyDataICC Profile Color Space Type Signature: 'Yxy '.- See Also:
-
icSigRgbData
public static final int icSigRgbDataICC Profile Color Space Type Signature: 'RGB '.- See Also:
-
icSigGrayData
public static final int icSigGrayDataICC Profile Color Space Type Signature: 'GRAY'.- See Also:
-
icSigHsvData
public static final int icSigHsvDataICC Profile Color Space Type Signature: 'HSV'.- See Also:
-
icSigHlsData
public static final int icSigHlsDataICC Profile Color Space Type Signature: 'HLS'.- See Also:
-
icSigCmykData
public static final int icSigCmykDataICC Profile Color Space Type Signature: 'CMYK'.- See Also:
-
icSigCmyData
public static final int icSigCmyDataICC Profile Color Space Type Signature: 'CMY '.- See Also:
-
icSigSpace2CLR
public static final int icSigSpace2CLRICC Profile Color Space Type Signature: '2CLR'.- See Also:
-
icSigSpace3CLR
public static final int icSigSpace3CLRICC Profile Color Space Type Signature: '3CLR'.- See Also:
-
icSigSpace4CLR
public static final int icSigSpace4CLRICC Profile Color Space Type Signature: '4CLR'.- See Also:
-
icSigSpace5CLR
public static final int icSigSpace5CLRICC Profile Color Space Type Signature: '5CLR'.- See Also:
-
icSigSpace6CLR
public static final int icSigSpace6CLRICC Profile Color Space Type Signature: '6CLR'.- See Also:
-
icSigSpace7CLR
public static final int icSigSpace7CLRICC Profile Color Space Type Signature: '7CLR'.- See Also:
-
icSigSpace8CLR
public static final int icSigSpace8CLRICC Profile Color Space Type Signature: '8CLR'.- See Also:
-
icSigSpace9CLR
public static final int icSigSpace9CLRICC Profile Color Space Type Signature: '9CLR'.- See Also:
-
icSigSpaceACLR
public static final int icSigSpaceACLRICC Profile Color Space Type Signature: 'ACLR'.- See Also:
-
icSigSpaceBCLR
public static final int icSigSpaceBCLRICC Profile Color Space Type Signature: 'BCLR'.- See Also:
-
icSigSpaceCCLR
public static final int icSigSpaceCCLRICC Profile Color Space Type Signature: 'CCLR'.- See Also:
-
icSigSpaceDCLR
public static final int icSigSpaceDCLRICC Profile Color Space Type Signature: 'DCLR'.- See Also:
-
icSigSpaceECLR
public static final int icSigSpaceECLRICC Profile Color Space Type Signature: 'ECLR'.- See Also:
-
icSigSpaceFCLR
public static final int icSigSpaceFCLRICC Profile Color Space Type Signature: 'FCLR'.- See Also:
-
icSigInputClass
public static final int icSigInputClassICC Profile Class Signature: 'scnr'.- See Also:
-
icSigDisplayClass
public static final int icSigDisplayClassICC Profile Class Signature: 'mntr'.- See Also:
-
icSigOutputClass
public static final int icSigOutputClassICC Profile Class Signature: 'prtr'.- See Also:
-
icSigLinkClass
public static final int icSigLinkClassICC Profile Class Signature: 'link'.- See Also:
-
icSigAbstractClass
public static final int icSigAbstractClassICC Profile Class Signature: 'abst'.- See Also:
-
icSigColorSpaceClass
public static final int icSigColorSpaceClassICC Profile Class Signature: 'spac'.- See Also:
-
icSigNamedColorClass
public static final int icSigNamedColorClassICC Profile Class Signature: 'nmcl'.- See Also:
-
icPerceptual
public static final int icPerceptualICC Profile Rendering Intent: Perceptual.- See Also:
-
icRelativeColorimetric
public static final int icRelativeColorimetricICC Profile Rendering Intent: RelativeColorimetric.- See Also:
-
icMediaRelativeColorimetric
public static final int icMediaRelativeColorimetricICC Profile Rendering Intent: Media-RelativeColorimetric.- Since:
- 1.5
- See Also:
-
icSaturation
public static final int icSaturationICC Profile Rendering Intent: Saturation.- See Also:
-
icAbsoluteColorimetric
public static final int icAbsoluteColorimetricICC Profile Rendering Intent: AbsoluteColorimetric.- See Also:
-
icICCAbsoluteColorimetric
public static final int icICCAbsoluteColorimetricICC Profile Rendering Intent: ICC-AbsoluteColorimetric.- Since:
- 1.5
- See Also:
-
icSigHead
public static final int icSigHeadICC Profile Tag Signature: 'head' - special.- See Also:
-
icSigAToB0Tag
public static final int icSigAToB0TagICC Profile Tag Signature: 'A2B0'.- See Also:
-
icSigAToB1Tag
public static final int icSigAToB1TagICC Profile Tag Signature: 'A2B1'.- See Also:
-
icSigAToB2Tag
public static final int icSigAToB2TagICC Profile Tag Signature: 'A2B2'.- See Also:
-
icSigBlueColorantTag
public static final int icSigBlueColorantTagICC Profile Tag Signature: 'bXYZ'.- See Also:
-
icSigBlueMatrixColumnTag
public static final int icSigBlueMatrixColumnTagICC Profile Tag Signature: 'bXYZ'.- Since:
- 1.5
- See Also:
-
icSigBlueTRCTag
public static final int icSigBlueTRCTagICC Profile Tag Signature: 'bTRC'.- See Also:
-
icSigBToA0Tag
public static final int icSigBToA0TagICC Profile Tag Signature: 'B2A0'.- See Also:
-
icSigBToA1Tag
public static final int icSigBToA1TagICC Profile Tag Signature: 'B2A1'.- See Also:
-
icSigBToA2Tag
public static final int icSigBToA2TagICC Profile Tag Signature: 'B2A2'.- See Also:
-
icSigCalibrationDateTimeTag
public static final int icSigCalibrationDateTimeTagICC Profile Tag Signature: 'calt'.- See Also:
-
icSigCharTargetTag
public static final int icSigCharTargetTagICC Profile Tag Signature: 'targ'.- See Also:
-
icSigCopyrightTag
public static final int icSigCopyrightTagICC Profile Tag Signature: 'cprt'.- See Also:
-
icSigCrdInfoTag
public static final int icSigCrdInfoTagICC Profile Tag Signature: 'crdi'.- See Also:
-
icSigDeviceMfgDescTag
public static final int icSigDeviceMfgDescTagICC Profile Tag Signature: 'dmnd'.- See Also:
-
icSigDeviceModelDescTag
public static final int icSigDeviceModelDescTagICC Profile Tag Signature: 'dmdd'.- See Also:
-
icSigDeviceSettingsTag
public static final int icSigDeviceSettingsTagICC Profile Tag Signature: 'devs'.- See Also:
-
icSigGamutTag
public static final int icSigGamutTagICC Profile Tag Signature: 'gamt'.- See Also:
-
icSigGrayTRCTag
public static final int icSigGrayTRCTagICC Profile Tag Signature: 'kTRC'.- See Also:
-
icSigGreenColorantTag
public static final int icSigGreenColorantTagICC Profile Tag Signature: 'gXYZ'.- See Also:
-
icSigGreenMatrixColumnTag
public static final int icSigGreenMatrixColumnTagICC Profile Tag Signature: 'gXYZ'.- Since:
- 1.5
- See Also:
-
icSigGreenTRCTag
public static final int icSigGreenTRCTagICC Profile Tag Signature: 'gTRC'.- See Also:
-
icSigLuminanceTag
public static final int icSigLuminanceTagICC Profile Tag Signature: 'lumi'.- See Also:
-
icSigMeasurementTag
public static final int icSigMeasurementTagICC Profile Tag Signature: 'meas'.- See Also:
-
icSigMediaBlackPointTag
public static final int icSigMediaBlackPointTagICC Profile Tag Signature: 'bkpt'.- See Also:
-
icSigMediaWhitePointTag
public static final int icSigMediaWhitePointTagICC Profile Tag Signature: 'wtpt'.- See Also:
-
icSigNamedColor2Tag
public static final int icSigNamedColor2TagICC Profile Tag Signature: 'ncl2'.- See Also:
-
icSigOutputResponseTag
public static final int icSigOutputResponseTagICC Profile Tag Signature: 'resp'.- See Also:
-
icSigPreview0Tag
public static final int icSigPreview0TagICC Profile Tag Signature: 'pre0'.- See Also:
-
icSigPreview1Tag
public static final int icSigPreview1TagICC Profile Tag Signature: 'pre1'.- See Also:
-
icSigPreview2Tag
public static final int icSigPreview2TagICC Profile Tag Signature: 'pre2'.- See Also:
-
icSigProfileDescriptionTag
public static final int icSigProfileDescriptionTagICC Profile Tag Signature: 'desc'.- See Also:
-
icSigProfileSequenceDescTag
public static final int icSigProfileSequenceDescTagICC Profile Tag Signature: 'pseq'.- See Also:
-
icSigPs2CRD0Tag
public static final int icSigPs2CRD0TagICC Profile Tag Signature: 'psd0'.- See Also:
-
icSigPs2CRD1Tag
public static final int icSigPs2CRD1TagICC Profile Tag Signature: 'psd1'.- See Also:
-
icSigPs2CRD2Tag
public static final int icSigPs2CRD2TagICC Profile Tag Signature: 'psd2'.- See Also:
-
icSigPs2CRD3Tag
public static final int icSigPs2CRD3TagICC Profile Tag Signature: 'psd3'.- See Also:
-
icSigPs2CSATag
public static final int icSigPs2CSATagICC Profile Tag Signature: 'ps2s'.- See Also:
-
icSigPs2RenderingIntentTag
public static final int icSigPs2RenderingIntentTagICC Profile Tag Signature: 'ps2i'.- See Also:
-
icSigRedColorantTag
public static final int icSigRedColorantTagICC Profile Tag Signature: 'rXYZ'.- See Also:
-
icSigRedMatrixColumnTag
public static final int icSigRedMatrixColumnTagICC Profile Tag Signature: 'rXYZ'.- Since:
- 1.5
- See Also:
-
icSigRedTRCTag
public static final int icSigRedTRCTagICC Profile Tag Signature: 'rTRC'.- See Also:
-
icSigScreeningDescTag
public static final int icSigScreeningDescTagICC Profile Tag Signature: 'scrd'.- See Also:
-
icSigScreeningTag
public static final int icSigScreeningTagICC Profile Tag Signature: 'scrn'.- See Also:
-
icSigTechnologyTag
public static final int icSigTechnologyTagICC Profile Tag Signature: 'tech'.- See Also:
-
icSigUcrBgTag
public static final int icSigUcrBgTagICC Profile Tag Signature: 'bfd '.- See Also:
-
icSigViewingCondDescTag
public static final int icSigViewingCondDescTagICC Profile Tag Signature: 'vued'.- See Also:
-
icSigViewingConditionsTag
public static final int icSigViewingConditionsTagICC Profile Tag Signature: 'view'.- See Also:
-
icSigChromaticityTag
public static final int icSigChromaticityTagICC Profile Tag Signature: 'chrm'.- See Also:
-
icSigChromaticAdaptationTag
public static final int icSigChromaticAdaptationTagICC Profile Tag Signature: 'chad'.- Since:
- 1.5
- See Also:
-
icSigColorantOrderTag
public static final int icSigColorantOrderTagICC Profile Tag Signature: 'clro'.- Since:
- 1.5
- See Also:
-
icSigColorantTableTag
public static final int icSigColorantTableTagICC Profile Tag Signature: 'clrt'.- Since:
- 1.5
- See Also:
-
icHdrSize
public static final int icHdrSizeICC Profile Header Location: profile size in bytes.- See Also:
-
icHdrCmmId
public static final int icHdrCmmIdICC Profile Header Location: CMM for this profile.- See Also:
-
icHdrVersion
public static final int icHdrVersionICC Profile Header Location: format version number.- See Also:
-
icHdrDeviceClass
public static final int icHdrDeviceClassICC Profile Header Location: type of profile.- See Also:
-
icHdrColorSpace
public static final int icHdrColorSpaceICC Profile Header Location: color space of data.- See Also:
-
icHdrPcs
public static final int icHdrPcsICC Profile Header Location: PCS - XYZ or Lab only.- See Also:
-
icHdrDate
public static final int icHdrDateICC Profile Header Location: date profile was created.- See Also:
-
icHdrMagic
public static final int icHdrMagicICC Profile Header Location: icMagicNumber.- See Also:
-
icHdrPlatform
public static final int icHdrPlatformICC Profile Header Location: primary platform.- See Also:
-
icHdrFlags
public static final int icHdrFlagsICC Profile Header Location: various bit settings.- See Also:
-
icHdrManufacturer
public static final int icHdrManufacturerICC Profile Header Location: device manufacturer.- See Also:
-
icHdrModel
public static final int icHdrModelICC Profile Header Location: device model number.- See Also:
-
icHdrAttributes
public static final int icHdrAttributesICC Profile Header Location: device attributes.- See Also:
-
icHdrRenderingIntent
public static final int icHdrRenderingIntentICC Profile Header Location: rendering intent.- See Also:
-
icHdrIlluminant
public static final int icHdrIlluminantICC Profile Header Location: profile illuminant.- See Also:
-
icHdrCreator
public static final int icHdrCreatorICC Profile Header Location: profile creator.- See Also:
-
icHdrProfileID
public static final int icHdrProfileIDICC Profile Header Location: profile's ID.- Since:
- 1.5
- See Also:
-
icTagType
public static final int icTagTypeICC Profile Constant: tag type signature.- See Also:
-
icTagReserved
public static final int icTagReservedICC Profile Constant: reserved.- See Also:
-
icCurveCount
public static final int icCurveCountICC Profile Constant: curveType count.- See Also:
-
icCurveData
public static final int icCurveDataICC Profile Constant: curveType data.- See Also:
-
icXYZNumberX
public static final int icXYZNumberXICC Profile Constant: XYZNumber X.- See Also:
-
-
Method Details
-
finalize
Deprecated, for removal: This API element is subject to removal in a future version.Thefinalize
method has been deprecated. Subclasses that overridefinalize
in order to perform cleanup should be modified to use alternative cleanup mechanisms and to remove the overridingfinalize
method. When overriding thefinalize
method, its implementation must explicitly ensure thatsuper.finalize()
is invoked as described inObject.finalize()
. See the specification forObject.finalize()
for further information about migration options.Frees the resources associated with anICC_Profile
object. -
getInstance
Constructs anICC_Profile
object corresponding to the data in a byte array.- Parameters:
data
- the specified ICC Profile data- Returns:
- an
ICC_Profile
object corresponding to the data in the specifieddata
array - Throws:
IllegalArgumentException
- If the byte array does not contain valid ICC Profile data
-
getInstance
Constructs anICC_Profile
corresponding to one of the specific color spaces defined by theColorSpace
class (for exampleCS_sRGB
). Throws anIllegalArgumentException
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 theColorSpace
class.- Returns:
- an
ICC_Profile
object corresponding to the specifiedColorSpace
type - Throws:
IllegalArgumentException
- Ifcspace
is not one of the predefined color space types
-
getInstance
Constructs anICC_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 thejava.iccprofile.path
property; second, relative to any directories specified by thejava.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 anIOException
if the specified file cannot be opened or if an I/O error occurs while reading the file. It throws anIllegalArgumentException
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 fileIllegalArgumentException
- If the file does not contain valid ICC Profile dataSecurityException
- If a security manager is installed and it does not permit read access to the given file
-
getInstance
Constructs anICC_Profile
corresponding to the data in anInputStream
. This method throws anIllegalArgumentException
if the stream does not contain valid ICC Profile data. It throws anIOException
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 specifiedInputStream
- Throws:
IOException
- If an I/O error occurs while reading the streamIllegalArgumentException
- If the stream does not contain valid ICC Profile data
-
getMajorVersion
public int getMajorVersion()Returns profile major version.- Returns:
- the major version of the profile
-
getMinorVersion
public int getMinorVersion()Returns profile minor version.- Returns:
- the minor version of the profile
-
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 theColorSpace
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
-
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 eitherTYPE_XYZ
orTYPE_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
-
write
Write thisICC_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
-
write
Write thisICC_Profile
to anOutputStream
.- Parameters:
s
- the stream to write the profile data to- Throws:
IOException
- If an I/O error occurs while writing to the stream
-
getData
public byte[] getData()Returns a byte array corresponding to the data of thisICC_Profile
.- Returns:
- a byte array that contains the profile data
- See Also:
-
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.- 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. - See Also:
-
setData
public void setData(int tagSignature, byte[] tagData) Sets a particular tagged data element in the profile from a byte array. The array should contain data in a format, corresponded to thetagSignature
as defined in the ICC specification, section 10. 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 settagData
- the data to set for the specified tag signature- Throws:
IllegalArgumentException
- iftagSignature
is not a signature as defined in the ICC specification.IllegalArgumentException
- if a content of thetagData
array can not be interpreted as valid tag data, corresponding to thetagSignature
- See Also:
-
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 isTYPE_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
-
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- Since:
- 1.3
-
finalize
method has been deprecated.