![]() |
PATH![]() |
![]() ![]() |
ColorSync supports the profile format defined by the International Color Consortium (ICC). The ICC format provides a single cross-platform standard for translating color data across devices. The ICC's common profile format allows one user to electronically transfer a document containing a color image to another user with the assurance that the original image will be rendered faithfully according to the source profile for the image.
To ensure this, the application or driver used to create the image stores the profile for the source device in the document containing the color image. The application can do this automatically or allow the user to tag the image. If the source profile is embedded within the document, a user can move the document from one system to another without concern for whether the profile used to create the image is available.
To support ColorSync, your application should, at a minimum, leave profile information intact in the documents and pictures it imports or copies. That is, your application should not strip out profile information from documents or pictures created with other applications. Even if your application does not use the profile information, users may be able to take advantage of it when using the documents or pictures with other applications.
For example, profiles and profile identifiers may be embedded in pictures that a user pastes into documents created by your application. A profile identifier is an abbreviated data structure that identifies, and possibly modifies, a profile in memory or on disk. For more information on profile identifiers, see Searching for a Profile That Matches a Profile Identifier . Profiles and profile identifiers can be embedded in formats such as PICT or TIFF files. For files of type 'PICT' , the ColorSync Manager defines the following picture comments for embedding profiles and profile identifiers, and for performing color matching:
/* PicComment IDs */
enum {
cmBeginProfile = 220, /* begin ColorSync 1.0 profile */
cmEndProfile = 221, /* end a ColorSync 2.x or 1.0
profile */
cmEnableMatching = 222, /* begin color matching for either
ColorSync 2.x or 1.0 */
cmDisableMatching = 223, /* end color matching for either
ColorSync 2.x or 1.0 */
cmComment = 224 /* embedded ColorSync 2.x profile
information */
};
The picture comment kind value of cmComment is defined for embedded ColorSync Manager version 2.x profiles and profile identifiers. This picture comment is followed by a 4-byte selector that describes the type of data in the picture comment.
/* PicComment selectors for cmComment */
enum {
cmBeginProfileSel = 0, /* begining of a ColorSync 2.x
profile; profile data to
follow */
cmContinueProfileSel = 1, /* continuation of a ColorSync
2.x profile; profile data to
follow */
cmEndProfileSel = 2 /* end of ColorSync 2.x profile
data; no profile data follows */
cmProfileIdentifierSel = 3 /* profile identifier information
follows; the matching profile
may be stored in the image or
on disk */
};
Your application should leave these comments and the embedded profile information they define intact. Similarly, if your application imports or converts file types defined by other applications, your application should maintain the profile information embedded in those files, too.
Your application can also embed picture comments and profiles in documents and pictures it creates or modifies. For information describing how to do this, see Embedding Profiles and Profile Identifiers . Inside Macintosh: Imaging With QuickDraw describes picture comments in detail.