Legacy Documentclose button

Important: The information in this document is obsolete and should not be used for new development.

Previous Book Contents Book Index Next

Inside Macintosh: Advanced Color Imaging Reference /
Chapter 3 - ColorSync Manager Reference for Applications and Device Drivers / Constants and Data Types
Using Picture Comments


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 NCMUseProfileComment function (page 3-129) 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" (page 4-31) in Advanced Color Imaging on the Mac OS.

Because a profile may exceed the QuickDraw 32 KB size limit for a picture comment, your application can use an ordered series of picture comments to embed a large profile. Figure 4-7 (page 4-33) in Advanced Color Imaging on the Mac OS 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 "Profile Identifier Structure" (page 3-64).

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. This selector has a behavior that is different from the cmEndProfile picture comment described in "Picture Comment Kinds for Profiles and Color Matching" (page 3-16).
cmProfileIdentifierSel
Identifies the inclusion of profile identifier data. For information on embedding a profile identifier, see the NCMUseProfileComment function (page 3-129). For information on the format of profile identifier data, see "Profile Identifier Structure" (page 3-64).

Previous Book Contents Book Index Next

© Apple Computer, Inc.
11 NOV 1996