Home » openjdk-7 » java » awt » color » [javadoc | source]
java.awt.color
public class: ICC_Profile [javadoc | source]
java.lang.Object
   java.awt.color.ICC_Profile

All Implemented Interfaces:
    java$io$Serializable

Direct Known Subclasses:
    ICC_ProfileGray, ICC_ProfileRGB, ICC_ProfileStub

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.

Field Summary
transient  long ID     
public static final  int CLASS_INPUT    Profile class is input. 
public static final  int CLASS_DISPLAY    Profile class is display. 
public static final  int CLASS_OUTPUT    Profile class is output. 
public static final  int CLASS_DEVICELINK    Profile class is device link. 
public static final  int CLASS_COLORSPACECONVERSION    Profile class is color space conversion. 
public static final  int CLASS_ABSTRACT    Profile class is abstract. 
public static final  int CLASS_NAMEDCOLOR    Profile class is named color. 
public static final  int icSigXYZData    ICC Profile Color Space Type Signature: 'XYZ '. 
public static final  int icSigLabData    ICC Profile Color Space Type Signature: 'Lab '. 
public static final  int icSigLuvData    ICC Profile Color Space Type Signature: 'Luv '. 
public static final  int icSigYCbCrData    ICC Profile Color Space Type Signature: 'YCbr'. 
public static final  int icSigYxyData    ICC Profile Color Space Type Signature: 'Yxy '. 
public static final  int icSigRgbData    ICC Profile Color Space Type Signature: 'RGB '. 
public static final  int icSigGrayData    ICC Profile Color Space Type Signature: 'GRAY'. 
public static final  int icSigHsvData    ICC Profile Color Space Type Signature: 'HSV'. 
public static final  int icSigHlsData    ICC Profile Color Space Type Signature: 'HLS'. 
public static final  int icSigCmykData    ICC Profile Color Space Type Signature: 'CMYK'. 
public static final  int icSigCmyData    ICC Profile Color Space Type Signature: 'CMY '. 
public static final  int icSigSpace2CLR    ICC Profile Color Space Type Signature: '2CLR'. 
public static final  int icSigSpace3CLR    ICC Profile Color Space Type Signature: '3CLR'. 
public static final  int icSigSpace4CLR    ICC Profile Color Space Type Signature: '4CLR'. 
public static final  int icSigSpace5CLR    ICC Profile Color Space Type Signature: '5CLR'. 
public static final  int icSigSpace6CLR    ICC Profile Color Space Type Signature: '6CLR'. 
public static final  int icSigSpace7CLR    ICC Profile Color Space Type Signature: '7CLR'. 
public static final  int icSigSpace8CLR    ICC Profile Color Space Type Signature: '8CLR'. 
public static final  int icSigSpace9CLR    ICC Profile Color Space Type Signature: '9CLR'. 
public static final  int icSigSpaceACLR    ICC Profile Color Space Type Signature: 'ACLR'. 
public static final  int icSigSpaceBCLR    ICC Profile Color Space Type Signature: 'BCLR'. 
public static final  int icSigSpaceCCLR    ICC Profile Color Space Type Signature: 'CCLR'. 
public static final  int icSigSpaceDCLR    ICC Profile Color Space Type Signature: 'DCLR'. 
public static final  int icSigSpaceECLR    ICC Profile Color Space Type Signature: 'ECLR'. 
public static final  int icSigSpaceFCLR    ICC Profile Color Space Type Signature: 'FCLR'. 
public static final  int icSigInputClass    ICC Profile Class Signature: 'scnr'. 
public static final  int icSigDisplayClass    ICC Profile Class Signature: 'mntr'. 
public static final  int icSigOutputClass    ICC Profile Class Signature: 'prtr'. 
public static final  int icSigLinkClass    ICC Profile Class Signature: 'link'. 
public static final  int icSigAbstractClass    ICC Profile Class Signature: 'abst'. 
public static final  int icSigColorSpaceClass    ICC Profile Class Signature: 'spac'. 
public static final  int icSigNamedColorClass    ICC Profile Class Signature: 'nmcl'. 
public static final  int icPerceptual    ICC Profile Rendering Intent: Perceptual. 
public static final  int icRelativeColorimetric    ICC Profile Rendering Intent: RelativeColorimetric. 
public static final  int icMediaRelativeColorimetric    ICC Profile Rendering Intent: Media-RelativeColorimetric.
    since: 1.5 -
 
public static final  int icSaturation    ICC Profile Rendering Intent: Saturation. 
public static final  int icAbsoluteColorimetric    ICC Profile Rendering Intent: AbsoluteColorimetric. 
public static final  int icICCAbsoluteColorimetric    ICC Profile Rendering Intent: ICC-AbsoluteColorimetric.
    since: 1.5 -
 
public static final  int icSigHead    ICC Profile Tag Signature: 'head' - special. 
public static final  int icSigAToB0Tag    ICC Profile Tag Signature: 'A2B0'. 
public static final  int icSigAToB1Tag    ICC Profile Tag Signature: 'A2B1'. 
public static final  int icSigAToB2Tag    ICC Profile Tag Signature: 'A2B2'. 
public static final  int icSigBlueColorantTag    ICC Profile Tag Signature: 'bXYZ'. 
public static final  int icSigBlueMatrixColumnTag    ICC Profile Tag Signature: 'bXYZ'.
    since: 1.5 -
 
public static final  int icSigBlueTRCTag    ICC Profile Tag Signature: 'bTRC'. 
public static final  int icSigBToA0Tag    ICC Profile Tag Signature: 'B2A0'. 
public static final  int icSigBToA1Tag    ICC Profile Tag Signature: 'B2A1'. 
public static final  int icSigBToA2Tag    ICC Profile Tag Signature: 'B2A2'. 
public static final  int icSigCalibrationDateTimeTag    ICC Profile Tag Signature: 'calt'. 
public static final  int icSigCharTargetTag    ICC Profile Tag Signature: 'targ'. 
public static final  int icSigCopyrightTag    ICC Profile Tag Signature: 'cprt'. 
public static final  int icSigCrdInfoTag    ICC Profile Tag Signature: 'crdi'. 
public static final  int icSigDeviceMfgDescTag    ICC Profile Tag Signature: 'dmnd'. 
public static final  int icSigDeviceModelDescTag    ICC Profile Tag Signature: 'dmdd'. 
public static final  int icSigDeviceSettingsTag    ICC Profile Tag Signature: 'devs'. 
public static final  int icSigGamutTag    ICC Profile Tag Signature: 'gamt'. 
public static final  int icSigGrayTRCTag    ICC Profile Tag Signature: 'kTRC'. 
public static final  int icSigGreenColorantTag    ICC Profile Tag Signature: 'gXYZ'. 
public static final  int icSigGreenMatrixColumnTag    ICC Profile Tag Signature: 'gXYZ'.
    since: 1.5 -
 
public static final  int icSigGreenTRCTag    ICC Profile Tag Signature: 'gTRC'. 
public static final  int icSigLuminanceTag    ICC Profile Tag Signature: 'lumi'. 
public static final  int icSigMeasurementTag    ICC Profile Tag Signature: 'meas'. 
public static final  int icSigMediaBlackPointTag    ICC Profile Tag Signature: 'bkpt'. 
public static final  int icSigMediaWhitePointTag    ICC Profile Tag Signature: 'wtpt'. 
public static final  int icSigNamedColor2Tag    ICC Profile Tag Signature: 'ncl2'. 
public static final  int icSigOutputResponseTag    ICC Profile Tag Signature: 'resp'. 
public static final  int icSigPreview0Tag    ICC Profile Tag Signature: 'pre0'. 
public static final  int icSigPreview1Tag    ICC Profile Tag Signature: 'pre1'. 
public static final  int icSigPreview2Tag    ICC Profile Tag Signature: 'pre2'. 
public static final  int icSigProfileDescriptionTag    ICC Profile Tag Signature: 'desc'. 
public static final  int icSigProfileSequenceDescTag    ICC Profile Tag Signature: 'pseq'. 
public static final  int icSigPs2CRD0Tag    ICC Profile Tag Signature: 'psd0'. 
public static final  int icSigPs2CRD1Tag    ICC Profile Tag Signature: 'psd1'. 
public static final  int icSigPs2CRD2Tag    ICC Profile Tag Signature: 'psd2'. 
public static final  int icSigPs2CRD3Tag    ICC Profile Tag Signature: 'psd3'. 
public static final  int icSigPs2CSATag    ICC Profile Tag Signature: 'ps2s'. 
public static final  int icSigPs2RenderingIntentTag    ICC Profile Tag Signature: 'ps2i'. 
public static final  int icSigRedColorantTag    ICC Profile Tag Signature: 'rXYZ'. 
public static final  int icSigRedMatrixColumnTag    ICC Profile Tag Signature: 'rXYZ'.
    since: 1.5 -
 
public static final  int icSigRedTRCTag    ICC Profile Tag Signature: 'rTRC'. 
public static final  int icSigScreeningDescTag    ICC Profile Tag Signature: 'scrd'. 
public static final  int icSigScreeningTag    ICC Profile Tag Signature: 'scrn'. 
public static final  int icSigTechnologyTag    ICC Profile Tag Signature: 'tech'. 
public static final  int icSigUcrBgTag    ICC Profile Tag Signature: 'bfd '. 
public static final  int icSigViewingCondDescTag    ICC Profile Tag Signature: 'vued'. 
public static final  int icSigViewingConditionsTag    ICC Profile Tag Signature: 'view'. 
public static final  int icSigChromaticityTag    ICC Profile Tag Signature: 'chrm'. 
public static final  int icSigChromaticAdaptationTag    ICC Profile Tag Signature: 'chad'.
    since: 1.5 -
 
public static final  int icSigColorantOrderTag    ICC Profile Tag Signature: 'clro'.
    since: 1.5 -
 
public static final  int icSigColorantTableTag    ICC Profile Tag Signature: 'clrt'.
    since: 1.5 -
 
public static final  int icHdrSize    ICC Profile Header Location: profile size in bytes. 
public static final  int icHdrCmmId    ICC Profile Header Location: CMM for this profile. 
public static final  int icHdrVersion    ICC Profile Header Location: format version number. 
public static final  int icHdrDeviceClass    ICC Profile Header Location: type of profile. 
public static final  int icHdrColorSpace    ICC Profile Header Location: color space of data. 
public static final  int icHdrPcs    ICC Profile Header Location: PCS - XYZ or Lab only. 
public static final  int icHdrDate    ICC Profile Header Location: date profile was created. 
public static final  int icHdrMagic    ICC Profile Header Location: icMagicNumber. 
public static final  int icHdrPlatform    ICC Profile Header Location: primary platform. 
public static final  int icHdrFlags    ICC Profile Header Location: various bit settings. 
public static final  int icHdrManufacturer    ICC Profile Header Location: device manufacturer. 
public static final  int icHdrModel    ICC Profile Header Location: device model number. 
public static final  int icHdrAttributes    ICC Profile Header Location: device attributes. 
public static final  int icHdrRenderingIntent    ICC Profile Header Location: rendering intent. 
public static final  int icHdrIlluminant    ICC Profile Header Location: profile illuminant. 
public static final  int icHdrCreator    ICC Profile Header Location: profile creator. 
public static final  int icHdrProfileID    ICC Profile Header Location: profile's ID.
    since: 1.5 -
 
public static final  int icTagType    ICC Profile Constant: tag type signaturE. 
public static final  int icTagReserved    ICC Profile Constant: reserved. 
public static final  int icCurveCount    ICC Profile Constant: curveType count. 
public static final  int icCurveData    ICC Profile Constant: curveType data. 
public static final  int icXYZNumberX    ICC Profile Constant: XYZNumber X. 
Constructor:
 ICC_Profile(long ID) 
 ICC_Profile(ProfileDeferralInfo pdi) 
    Constructs an ICC_Profile object whose loading will be deferred. The ID will be 0 until the profile is loaded.
Method from java.awt.color.ICC_Profile Summary:
activateDeferredProfile,   finalize,   getColorSpaceType,   getColorSpaceType,   getData,   getData,   getData,   getDeferredInstance,   getGamma,   getInstance,   getInstance,   getInstance,   getInstance,   getMajorVersion,   getMediaWhitePoint,   getMinorVersion,   getNumComponents,   getPCSType,   getPCSType,   getProfileClass,   getProfileDataFromStream,   getRenderingIntent,   getTRC,   getXYZTag,   iccCStoJCS,   intFromBigEndian,   intToBigEndian,   readResolve,   setData,   setRenderingIntent,   shortFromBigEndian,   shortToBigEndian,   write,   write
Methods from java.lang.Object:
clone,   equals,   finalize,   getClass,   hashCode,   notify,   notifyAll,   toString,   wait,   wait,   wait
Method from java.awt.color.ICC_Profile Detail:
  void activateDeferredProfile() throws ProfileDataException 
 protected  void finalize() 
    Frees the resources associated with an ICC_Profile object.
 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.
 static int getColorSpaceType(long profileID) 
 public byte[] getData() 
    Returns a byte array corresponding to the data of this ICC_Profile.
 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.
 static byte[] getData(long profileID,
    int tagSignature) 
 static ICC_Profile getDeferredInstance(ProfileDeferralInfo pdi) 
    Constructs an ICC_Profile for which the actual loading of the profile data from a file and the initialization of the CMM should be deferred as long as possible. Deferral is only used for standard profiles. If deferring is disabled, then getStandardProfile() ensures that all of the appropriate access privileges are granted when loading this profile. If deferring is enabled, then the deferred activation code will take care of access privileges.
 float getGamma(int theTagSignature) 
    Returns a gamma value representing a tone reproduction curve (TRC). If the profile represents the TRC as a table rather than a single gamma value, then an exception is thrown. In this case the actual table can be obtained via getTRC(). theTagSignature should be one of icSigGrayTRCTag, icSigRedTRCTag, icSigGreenTRCTag, or icSigBlueTRCTag.
 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.
 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.
 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.
 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.
 public int getMajorVersion() 
    Returns profile major version.
 float[] getMediaWhitePoint() 
    Returns a float array of length 3 containing the X, Y, and Z components of the mediaWhitePointTag in the ICC profile.
 public int getMinorVersion() 
    Returns profile minor version.
 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.
 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.
 static int getPCSType(long profileID) 
 public int getProfileClass() 
    Returns the profile class.
 static byte[] getProfileDataFromStream(InputStream s) throws IOException 
 int getRenderingIntent() 
    Returns the rendering intent of the profile. This is used to select the proper transform from a profile that has multiple transforms. It is typically set in a source profile to select a transform from an output profile.
 short[] getTRC(int theTagSignature) 
    Returns the TRC as an array of shorts. If the profile has specified the TRC as linear (gamma = 1.0) or as a simple gamma value, this method throws an exception, and the getGamma() method should be used to get the gamma value. Otherwise the short array returned here represents a lookup table where the input Gray value is conceptually in the range [0.0, 1.0]. Value 0.0 maps to array index 0 and value 1.0 maps to array index length-1. Interpolation may be used to generate output values for input values which do not map exactly to an index in the array. Output values also map linearly to the range [0.0, 1.0]. Value 0.0 is represented by an array value of 0x0000 and value 1.0 by 0xFFFF, i.e. the values are really unsigned short values, although they are returned in a short array. theTagSignature should be one of icSigGrayTRCTag, icSigRedTRCTag, icSigGreenTRCTag, or icSigBlueTRCTag.
 float[] getXYZTag(int theTagSignature) 
    Returns a float array of length 3 containing the X, Y, and Z components encoded in an XYZType tag.
 static int iccCStoJCS(int theColorSpaceSig) 
 static int intFromBigEndian(byte[] array,
    int index) 
 static  void intToBigEndian(int value,
    byte[] array,
    int index) 
 protected Object readResolve() throws ObjectStreamException 
    Resolves instances being deserialized into instances registered with CMM.
 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 the {@code 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.
  void setRenderingIntent(int renderingIntent) 
    Sets the rendering intent of the profile. This is used to select the proper transform from a profile that has multiple transforms.
 static short shortFromBigEndian(byte[] array,
    int index) 
 static  void shortToBigEndian(short value,
    byte[] array,
    int index) 
 public  void write(String fileName) throws IOException 
    Write this ICC_Profile to a file.
 public  void write(OutputStream s) throws IOException 
    Write this ICC_Profile to an OutputStream.