Class ICC_Profile
- All Implemented Interfaces:
Serializable
- Direct Known Subclasses:
-
ICC_ProfileGray
,ICC_ProfileRGB
public class ICC_Profile extends Object implements Serializable
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 Type | Field | Description |
---|---|---|
static final int |
CLASS_ABSTRACT |
Profile class is abstract. |
static final int |
CLASS_COLORSPACECONVERSION |
Profile class is color space conversion. |
static final int |
CLASS_DEVICELINK |
Profile class is device link. |
static final int |
CLASS_DISPLAY |
Profile class is display. |
static final int |
CLASS_INPUT |
Profile class is input. |
static final int |
CLASS_NAMEDCOLOR |
Profile class is named color. |
static final int |
CLASS_OUTPUT |
Profile class is output. |
static final int |
icAbsoluteColorimetric |
ICC Profile Rendering Intent: AbsoluteColorimetric. |
static final int |
icCurveCount |
ICC Profile Constant: curveType count. |
static final int |
icCurveData |
ICC Profile Constant: curveType data. |
static final int |
icHdrAttributes |
ICC Profile Header Location: device attributes. |
static final int |
icHdrCmmId |
ICC Profile Header Location: CMM for this profile. |
static final int |
icHdrColorSpace |
ICC Profile Header Location: color space of data. |
static final int |
icHdrCreator |
ICC Profile Header Location: profile creator. |
static final int |
icHdrDate |
ICC Profile Header Location: date profile was created. |
static final int |
icHdrDeviceClass |
ICC Profile Header Location: type of profile. |
static final int |
icHdrFlags |
ICC Profile Header Location: various bit settings. |
static final int |
icHdrIlluminant |
ICC Profile Header Location: profile illuminant. |
static final int |
icHdrMagic |
ICC Profile Header Location: icMagicNumber. |
static final int |
icHdrManufacturer |
ICC Profile Header Location: device manufacturer. |
static final int |
icHdrModel |
ICC Profile Header Location: device model number. |
static final int |
icHdrPcs |
ICC Profile Header Location: PCS - XYZ or Lab only. |
static final int |
icHdrPlatform |
ICC Profile Header Location: primary platform. |
static final int |
icHdrProfileID |
ICC Profile Header Location: profile's ID. |
static final int |
icHdrRenderingIntent |
ICC Profile Header Location: rendering intent. |
static final int |
icHdrSize |
ICC Profile Header Location: profile size in bytes. |
static final int |
icHdrVersion |
ICC Profile Header Location: format version number. |
static final int |
icICCAbsoluteColorimetric |
ICC Profile Rendering Intent: ICC-AbsoluteColorimetric. |
static final int |
icMediaRelativeColorimetric |
ICC Profile Rendering Intent: Media-RelativeColorimetric. |
static final int |
icPerceptual |
ICC Profile Rendering Intent: Perceptual. |
static final int |
icRelativeColorimetric |
ICC Profile Rendering Intent: RelativeColorimetric. |
static final int |
icSaturation |
ICC Profile Rendering Intent: Saturation. |
static final int |
icSigAbstractClass |
ICC Profile Class Signature: 'abst'. |
static final int |
icSigAToB0Tag |
ICC Profile Tag Signature: 'A2B0'. |
static final int |
icSigAToB1Tag |
ICC Profile Tag Signature: 'A2B1'. |
static final int |
icSigAToB2Tag |
ICC Profile Tag Signature: 'A2B2'. |
static final int |
icSigBlueColorantTag |
ICC Profile Tag Signature: 'bXYZ'. |
static final int |
icSigBlueMatrixColumnTag |
ICC Profile Tag Signature: 'bXYZ'. |
static final int |
icSigBlueTRCTag |
ICC Profile Tag Signature: 'bTRC'. |
static final int |
icSigBToA0Tag |
ICC Profile Tag Signature: 'B2A0'. |
static final int |
icSigBToA1Tag |
ICC Profile Tag Signature: 'B2A1'. |
static final int |
icSigBToA2Tag |
ICC Profile Tag Signature: 'B2A2'. |
static final int |
icSigCalibrationDateTimeTag |
ICC Profile Tag Signature: 'calt'. |
static final int |
icSigCharTargetTag |
ICC Profile Tag Signature: 'targ'. |
static final int |
icSigChromaticAdaptationTag |
ICC Profile Tag Signature: 'chad'. |
static final int |
icSigChromaticityTag |
ICC Profile Tag Signature: 'chrm'. |
static final int |
icSigCmyData |
ICC Profile Color Space Type Signature: 'CMY '. |
static final int |
icSigCmykData |
ICC Profile Color Space Type Signature: 'CMYK'. |
static final int |
icSigColorantOrderTag |
ICC Profile Tag Signature: 'clro'. |
static final int |
icSigColorantTableTag |
ICC Profile Tag Signature: 'clrt'. |
static final int |
icSigColorSpaceClass |
ICC Profile Class Signature: 'spac'. |
static final int |
icSigCopyrightTag |
ICC Profile Tag Signature: 'cprt'. |
static final int |
icSigCrdInfoTag |
ICC Profile Tag Signature: 'crdi'. |
static final int |
icSigDeviceMfgDescTag |
ICC Profile Tag Signature: 'dmnd'. |
static final int |
icSigDeviceModelDescTag |
ICC Profile Tag Signature: 'dmdd'. |
static final int |
icSigDeviceSettingsTag |
ICC Profile Tag Signature: 'devs'. |
static final int |
icSigDisplayClass |
ICC Profile Class Signature: 'mntr'. |
static final int |
icSigGamutTag |
ICC Profile Tag Signature: 'gamt'. |
static final int |
icSigGrayData |
ICC Profile Color Space Type Signature: 'GRAY'. |
static final int |
icSigGrayTRCTag |
ICC Profile Tag Signature: 'kTRC'. |
static final int |
icSigGreenColorantTag |
ICC Profile Tag Signature: 'gXYZ'. |
static final int |
icSigGreenMatrixColumnTag |
ICC Profile Tag Signature: 'gXYZ'. |
static final int |
icSigGreenTRCTag |
ICC Profile Tag Signature: 'gTRC'. |
static final int |
icSigHead |
ICC Profile Tag Signature: 'head' - special. |
static final int |
icSigHlsData |
ICC Profile Color Space Type Signature: 'HLS'. |
static final int |
icSigHsvData |
ICC Profile Color Space Type Signature: 'HSV'. |
static final int |
icSigInputClass |
ICC Profile Class Signature: 'scnr'. |
static final int |
icSigLabData |
ICC Profile Color Space Type Signature: 'Lab '. |
static final int |
icSigLinkClass |
ICC Profile Class Signature: 'link'. |
static final int |
icSigLuminanceTag |
ICC Profile Tag Signature: 'lumi'. |
static final int |
icSigLuvData |
ICC Profile Color Space Type Signature: 'Luv '. |
static final int |
icSigMeasurementTag |
ICC Profile Tag Signature: 'meas'. |
static final int |
icSigMediaBlackPointTag |
ICC Profile Tag Signature: 'bkpt'. |
static final int |
icSigMediaWhitePointTag |
ICC Profile Tag Signature: 'wtpt'. |
static final int |
icSigNamedColor2Tag |
ICC Profile Tag Signature: 'ncl2'. |
static final int |
icSigNamedColorClass |
ICC Profile Class Signature: 'nmcl'. |
static final int |
icSigOutputClass |
ICC Profile Class Signature: 'prtr'. |
static final int |
icSigOutputResponseTag |
ICC Profile Tag Signature: 'resp'. |
static final int |
icSigPreview0Tag |
ICC Profile Tag Signature: 'pre0'. |
static final int |
icSigPreview1Tag |
ICC Profile Tag Signature: 'pre1'. |
static final int |
icSigPreview2Tag |
ICC Profile Tag Signature: 'pre2'. |
static final int |
icSigProfileDescriptionTag |
ICC Profile Tag Signature: 'desc'. |
static final int |
icSigProfileSequenceDescTag |
ICC Profile Tag Signature: 'pseq'. |
static final int |
icSigPs2CRD0Tag |
ICC Profile Tag Signature: 'psd0'. |
static final int |
icSigPs2CRD1Tag |
ICC Profile Tag Signature: 'psd1'. |
static final int |
icSigPs2CRD2Tag |
ICC Profile Tag Signature: 'psd2'. |
static final int |
icSigPs2CRD3Tag |
ICC Profile Tag Signature: 'psd3'. |
static final int |
icSigPs2CSATag |
ICC Profile Tag Signature: 'ps2s'. |
static final int |
icSigPs2RenderingIntentTag |
ICC Profile Tag Signature: 'ps2i'. |
static final int |
icSigRedColorantTag |
ICC Profile Tag Signature: 'rXYZ'. |
static final int |
icSigRedMatrixColumnTag |
ICC Profile Tag Signature: 'rXYZ'. |
static final int |
icSigRedTRCTag |
ICC Profile Tag Signature: 'rTRC'. |
static final int |
icSigRgbData |
ICC Profile Color Space Type Signature: 'RGB '. |
static final int |
icSigScreeningDescTag |
ICC Profile Tag Signature: 'scrd'. |
static final int |
icSigScreeningTag |
ICC Profile Tag Signature: 'scrn'. |
static final int |
icSigSpace2CLR |
ICC Profile Color Space Type Signature: '2CLR'. |
static final int |
icSigSpace3CLR |
ICC Profile Color Space Type Signature: '3CLR'. |
static final int |
icSigSpace4CLR |
ICC Profile Color Space Type Signature: '4CLR'. |
static final int |
icSigSpace5CLR |
ICC Profile Color Space Type Signature: '5CLR'. |
static final int |
icSigSpace6CLR |
ICC Profile Color Space Type Signature: '6CLR'. |
static final int |
icSigSpace7CLR |
ICC Profile Color Space Type Signature: '7CLR'. |
static final int |
icSigSpace8CLR |
ICC Profile Color Space Type Signature: '8CLR'. |
static final int |
icSigSpace9CLR |
ICC Profile Color Space Type Signature: '9CLR'. |
static final int |
icSigSpaceACLR |
ICC Profile Color Space Type Signature: 'ACLR'. |
static final int |
icSigSpaceBCLR |
ICC Profile Color Space Type Signature: 'BCLR'. |
static final int |
icSigSpaceCCLR |
ICC Profile Color Space Type Signature: 'CCLR'. |
static final int |
icSigSpaceDCLR |
ICC Profile Color Space Type Signature: 'DCLR'. |
static final int |
icSigSpaceECLR |
ICC Profile Color Space Type Signature: 'ECLR'. |
static final int |
icSigSpaceFCLR |
ICC Profile Color Space Type Signature: 'FCLR'. |
static final int |
icSigTechnologyTag |
ICC Profile Tag Signature: 'tech'. |
static final int |
icSigUcrBgTag |
ICC Profile Tag Signature: 'bfd '. |
static final int |
icSigViewingCondDescTag |
ICC Profile Tag Signature: 'vued'. |
static final int |
icSigViewingConditionsTag |
ICC Profile Tag Signature: 'view'. |
static final int |
icSigXYZData |
ICC Profile Color Space Type Signature: 'XYZ '. |
static final int |
icSigYCbCrData |
ICC Profile Color Space Type Signature: 'YCbr'. |
static final int |
icSigYxyData |
ICC Profile Color Space Type Signature: 'Yxy '. |
static final int |
icTagReserved |
ICC Profile Constant: reserved. |
static final int |
icTagType |
ICC Profile Constant: tag type signature. |
static final int |
icXYZNumberX |
ICC Profile Constant: XYZNumber X. |
Method Summary
Modifier and Type | Method | Description |
---|---|---|
protected void |
finalize() |
Deprecated, for removal: This API element is subject to removal in a future version. |
int |
getColorSpaceType() |
Returns the color space type. |
byte[] |
getData() |
Returns a byte array corresponding to the data of this ICC_Profile . |
byte[] |
getData |
Returns a particular tagged data element from the profile as a byte array. |
static ICC_Profile |
getInstance |
Constructs an ICC_Profile object corresponding to the data in a byte array. |
static ICC_Profile |
getInstance |
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 |
Constructs an ICC_Profile corresponding to the data in an InputStream . |
static ICC_Profile |
getInstance |
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 |
Sets a particular tagged data element in the profile from a byte array. |
void |
write |
Write this ICC_Profile to an OutputStream . |
void |
write |
Write this ICC_Profile to a file. |
Field Details
CLASS_INPUT
public static final int CLASS_INPUT
- See Also:
CLASS_DISPLAY
public static final int CLASS_DISPLAY
- See Also:
CLASS_OUTPUT
public static final int CLASS_OUTPUT
- See Also:
CLASS_DEVICELINK
public static final int CLASS_DEVICELINK
- See Also:
CLASS_COLORSPACECONVERSION
public static final int CLASS_COLORSPACECONVERSION
- See Also:
CLASS_ABSTRACT
public static final int CLASS_ABSTRACT
- See Also:
CLASS_NAMEDCOLOR
public static final int CLASS_NAMEDCOLOR
- See Also:
icSigXYZData
public static final int icSigXYZData
- See Also:
icSigLabData
public static final int icSigLabData
- See Also:
icSigLuvData
public static final int icSigLuvData
- See Also:
icSigYCbCrData
public static final int icSigYCbCrData
- See Also:
icSigYxyData
public static final int icSigYxyData
- See Also:
icSigRgbData
public static final int icSigRgbData
- See Also:
icSigGrayData
public static final int icSigGrayData
- See Also:
icSigHsvData
public static final int icSigHsvData
- See Also:
icSigHlsData
public static final int icSigHlsData
- See Also:
icSigCmykData
public static final int icSigCmykData
- See Also:
icSigCmyData
public static final int icSigCmyData
- See Also:
icSigSpace2CLR
public static final int icSigSpace2CLR
- See Also:
icSigSpace3CLR
public static final int icSigSpace3CLR
- See Also:
icSigSpace4CLR
public static final int icSigSpace4CLR
- See Also:
icSigSpace5CLR
public static final int icSigSpace5CLR
- See Also:
icSigSpace6CLR
public static final int icSigSpace6CLR
- See Also:
icSigSpace7CLR
public static final int icSigSpace7CLR
- See Also:
icSigSpace8CLR
public static final int icSigSpace8CLR
- See Also:
icSigSpace9CLR
public static final int icSigSpace9CLR
- See Also:
icSigSpaceACLR
public static final int icSigSpaceACLR
- See Also:
icSigSpaceBCLR
public static final int icSigSpaceBCLR
- See Also:
icSigSpaceCCLR
public static final int icSigSpaceCCLR
- See Also:
icSigSpaceDCLR
public static final int icSigSpaceDCLR
- See Also:
icSigSpaceECLR
public static final int icSigSpaceECLR
- See Also:
icSigSpaceFCLR
public static final int icSigSpaceFCLR
- See Also:
icSigInputClass
public static final int icSigInputClass
- See Also:
icSigDisplayClass
public static final int icSigDisplayClass
- See Also:
icSigOutputClass
public static final int icSigOutputClass
- See Also:
icSigLinkClass
public static final int icSigLinkClass
- See Also:
icSigAbstractClass
public static final int icSigAbstractClass
- See Also:
icSigColorSpaceClass
public static final int icSigColorSpaceClass
- See Also:
icSigNamedColorClass
public static final int icSigNamedColorClass
- See Also:
icPerceptual
public static final int icPerceptual
- See Also:
icRelativeColorimetric
public static final int icRelativeColorimetric
- See Also:
icMediaRelativeColorimetric
public static final int icMediaRelativeColorimetric
- Since:
- 1.5
- See Also:
icSaturation
public static final int icSaturation
- See Also:
icAbsoluteColorimetric
public static final int icAbsoluteColorimetric
- See Also:
icICCAbsoluteColorimetric
public static final int icICCAbsoluteColorimetric
- Since:
- 1.5
- See Also:
icSigHead
public static final int icSigHead
- See Also:
icSigAToB0Tag
public static final int icSigAToB0Tag
- See Also:
icSigAToB1Tag
public static final int icSigAToB1Tag
- See Also:
icSigAToB2Tag
public static final int icSigAToB2Tag
- See Also:
icSigBlueColorantTag
public static final int icSigBlueColorantTag
- See Also:
icSigBlueMatrixColumnTag
public static final int icSigBlueMatrixColumnTag
- Since:
- 1.5
- See Also:
icSigBlueTRCTag
public static final int icSigBlueTRCTag
- See Also:
icSigBToA0Tag
public static final int icSigBToA0Tag
- See Also:
icSigBToA1Tag
public static final int icSigBToA1Tag
- See Also:
icSigBToA2Tag
public static final int icSigBToA2Tag
- See Also:
icSigCalibrationDateTimeTag
public static final int icSigCalibrationDateTimeTag
- See Also:
icSigCharTargetTag
public static final int icSigCharTargetTag
- See Also:
icSigCopyrightTag
public static final int icSigCopyrightTag
- See Also:
icSigCrdInfoTag
public static final int icSigCrdInfoTag
- See Also:
icSigDeviceMfgDescTag
public static final int icSigDeviceMfgDescTag
- See Also:
icSigDeviceModelDescTag
public static final int icSigDeviceModelDescTag
- See Also:
icSigDeviceSettingsTag
public static final int icSigDeviceSettingsTag
- See Also:
icSigGamutTag
public static final int icSigGamutTag
- See Also:
icSigGrayTRCTag
public static final int icSigGrayTRCTag
- See Also:
icSigGreenColorantTag
public static final int icSigGreenColorantTag
- See Also:
icSigGreenMatrixColumnTag
public static final int icSigGreenMatrixColumnTag
- Since:
- 1.5
- See Also:
icSigGreenTRCTag
public static final int icSigGreenTRCTag
- See Also:
icSigLuminanceTag
public static final int icSigLuminanceTag
- See Also:
icSigMeasurementTag
public static final int icSigMeasurementTag
- See Also:
icSigMediaBlackPointTag
public static final int icSigMediaBlackPointTag
- See Also:
icSigMediaWhitePointTag
public static final int icSigMediaWhitePointTag
- See Also:
icSigNamedColor2Tag
public static final int icSigNamedColor2Tag
- See Also:
icSigOutputResponseTag
public static final int icSigOutputResponseTag
- See Also:
icSigPreview0Tag
public static final int icSigPreview0Tag
- See Also:
icSigPreview1Tag
public static final int icSigPreview1Tag
- See Also:
icSigPreview2Tag
public static final int icSigPreview2Tag
- See Also:
icSigProfileDescriptionTag
public static final int icSigProfileDescriptionTag
- See Also:
icSigProfileSequenceDescTag
public static final int icSigProfileSequenceDescTag
- See Also:
icSigPs2CRD0Tag
public static final int icSigPs2CRD0Tag
- See Also:
icSigPs2CRD1Tag
public static final int icSigPs2CRD1Tag
- See Also:
icSigPs2CRD2Tag
public static final int icSigPs2CRD2Tag
- See Also:
icSigPs2CRD3Tag
public static final int icSigPs2CRD3Tag
- See Also:
icSigPs2CSATag
public static final int icSigPs2CSATag
- See Also:
icSigPs2RenderingIntentTag
public static final int icSigPs2RenderingIntentTag
- See Also:
icSigRedColorantTag
public static final int icSigRedColorantTag
- See Also:
icSigRedMatrixColumnTag
public static final int icSigRedMatrixColumnTag
- Since:
- 1.5
- See Also:
icSigRedTRCTag
public static final int icSigRedTRCTag
- See Also:
icSigScreeningDescTag
public static final int icSigScreeningDescTag
- See Also:
icSigScreeningTag
public static final int icSigScreeningTag
- See Also:
icSigTechnologyTag
public static final int icSigTechnologyTag
- See Also:
icSigUcrBgTag
public static final int icSigUcrBgTag
- See Also:
icSigViewingCondDescTag
public static final int icSigViewingCondDescTag
- See Also:
icSigViewingConditionsTag
public static final int icSigViewingConditionsTag
- See Also:
icSigChromaticityTag
public static final int icSigChromaticityTag
- See Also:
icSigChromaticAdaptationTag
public static final int icSigChromaticAdaptationTag
- Since:
- 1.5
- See Also:
icSigColorantOrderTag
public static final int icSigColorantOrderTag
- Since:
- 1.5
- See Also:
icSigColorantTableTag
public static final int icSigColorantTableTag
- Since:
- 1.5
- See Also:
icHdrSize
public static final int icHdrSize
- See Also:
icHdrCmmId
public static final int icHdrCmmId
- See Also:
icHdrVersion
public static final int icHdrVersion
- See Also:
icHdrDeviceClass
public static final int icHdrDeviceClass
- See Also:
icHdrColorSpace
public static final int icHdrColorSpace
- See Also:
icHdrPcs
public static final int icHdrPcs
- See Also:
icHdrDate
public static final int icHdrDate
- See Also:
icHdrMagic
public static final int icHdrMagic
- See Also:
icHdrPlatform
public static final int icHdrPlatform
- See Also:
icHdrFlags
public static final int icHdrFlags
- See Also:
icHdrManufacturer
public static final int icHdrManufacturer
- See Also:
icHdrModel
public static final int icHdrModel
- See Also:
icHdrAttributes
public static final int icHdrAttributes
- See Also:
icHdrRenderingIntent
public static final int icHdrRenderingIntent
- See Also:
icHdrIlluminant
public static final int icHdrIlluminant
- See Also:
icHdrCreator
public static final int icHdrCreator
- See Also:
icHdrProfileID
public static final int icHdrProfileID
- Since:
- 1.5
- See Also:
icTagType
public static final int icTagType
- See Also:
icTagReserved
public static final int icTagReserved
- See Also:
icCurveCount
public static final int icCurveCount
- See Also:
icCurveData
public static final int icCurveData
- See Also:
icXYZNumberX
public static final int icXYZNumberX
- See Also:
Method Details
finalize
@Deprecated(since="9", forRemoval=true) protected void finalize()
finalize
method has been deprecated. Subclasses that override finalize
in order to perform cleanup should be modified to use alternative cleanup mechanisms and to remove the overriding finalize
method. When overriding the finalize
method, its implementation must explicitly ensure that super.finalize()
is invoked as described in Object.finalize()
. See the specification for Object.finalize()
for further information about migration options.ICC_Profile
object.getInstance
public static ICC_Profile getInstance(byte[] data)
ICC_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
public static ICC_Profile getInstance(int cspace)
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 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
public static ICC_Profile getInstance(String fileName) throws IOException
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
getInstance
public static ICC_Profile getInstance(InputStream s) throws IOException
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 specifiedInputStream
- Throws:
-
IOException
- If an I/O error occurs while reading the stream -
IllegalArgumentException
- If the stream does not contain valid ICC Profile data
getMajorVersion
public int getMajorVersion()
- Returns:
- the major version of the profile
getMinorVersion
public int getMinorVersion()
- Returns:
- the minor version of the profile
getProfileClass
public int getProfileClass()
- Returns:
- one of the predefined profile class constants
getColorSpaceType
public int getColorSpaceType()
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
getPCSType
public int getPCSType()
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
write
public void write(String fileName) throws IOException
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
write
public void write(OutputStream s) throws IOException
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
getData
public byte[] getData()
ICC_Profile
.- Returns:
- a byte array that contains the profile data
- See Also:
getData
public byte[] getData(int tagSignature)
- 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)
tagSignature
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 set -
tagData
- 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()
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
readResolve
protected Object readResolve() throws ObjectStreamException
- Returns:
- ICC_Profile object for profile registered with CMM
- Throws:
-
ObjectStreamException
- never thrown, but mandated by the serialization spec - Since:
- 1.3
© 1993, 2021, Oracle and/or its affiliates. All rights reserved.
Documentation extracted from Debian's OpenJDK Development Kit package.
Licensed under the GNU General Public License, version 2, with the Classpath Exception.
Various third party code in OpenJDK is licensed under different licenses (see Debian package).
Java and OpenJDK are trademarks or registered trademarks of Oracle and/or its affiliates.
https://docs.oracle.com/en/java/javase/17/docs/api/java.desktop/java/awt/color/ICC_Profile.html
finalize
method has been deprecated.