PATHMac OS 8 Developer Documentation > Mutlimedia and Graphics > ColorSync Manager >

Managing Color With ColorSync


Picture Comment Selectors for Embedding Profile Information

To embed a version 2.x profile or profile identifier reference in a picture destined for display on another system or on a device such as a printer, your application uses the QuickDraw PicComment function. The ColorSync Manager provides the function NCMUseProfileComment to embed picture comments. You specify a picture comment kind value of cmComment and a 4-byte selector describing the data in the picture comment. For sample code showing how to use NCMUseProfileComment to embed profile information, see Embedding Profiles and Profile Identifiers .

Because a profile may exceed QuickDraw's 32 KB size limit for a picture comment, your application can use an ordered series of picture comments to embed a large profile. Figure 7 shows how a large profile is embedded in a PICT file picture.

You can also embed a profile identifier reference in a picture. The profile identifier may refer to a previously embedded profile, so that you don't have to embed the entire profile again, or it may refer to a profile stored on disk. When you embed a profile identifier, you can change certain values for the referred-to profile, including the quality flags and rendering intent. For more information on profile identifiers, see CMProfileIdentifier .

The following enumeration defines the 4-byte selector values your application uses to identify the beginning and continuation of profile data and to signal the end of it.

enum {
    cmBeginProfileSel           = 0,    /* start 2.x profile data */
    cmContinueProfileSel        = 1,    /* continuation of 2.x data */
    cmEndProfileSel             = 2,    /* end 2.x profile data */
    cmProfileIdentifierSel      = 3     /* profile identifier data */
};

Enumerator descriptions

cmBeginProfileSel
Identifies the beginning of version 2.x profile data. The amount of profile data you can specify is limited to 32K minus 4 bytes for the selector.
cmContinueProfileSel
Identifies the continuation of version 2.x profile data. The amount of profile data you can specify is limited to 32K minus 4 bytes for the selector. You can use this selector repeatedly until all the profile data is embedded.
cmEndProfileSel
Signals the end of version 2.x profile data--no more data follows. Even if the amount of profile data embedded does not exceed 32K minus 4 bytes for the selector and your application did not use cmContinueProfileSel , you must terminate the process with cmEndProfileSel . Note that this selector has a behavior that is different from the cmEndProfile picture comment described in Picture Comment Kinds for Profiles and Color Matching .
cmProfileIdentifierSel
Identifies the inclusion of profile identifier data. For information on embedding a profile identifier, see the function NCMUseProfileComment. For information on the format of profile identifier data, see CMProfileIdentifier .

© 1988-1999 Apple Computer, Inc. — (Last Updated 20 Jan 99)