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 Kinds for Profiles and Color Matching

The ColorSync Manager defines five picture comment kinds. These comments are used to embed a profile identifier, begin or end use of an embedded profile, and enable or disable color matching within drawing code sent to an output device. The PicComment function's kind parameter specifies the kind of picture comment.

IMPORTANT
When you want to terminate use of the currently effective embedded profile, you should do so explicitly by specifying a picture comment of kind cmEndProfile. This terminates use of the current profile and begins use of the system profile. If you do not include this picture comment, the currently effective profile remains in effect. This can cause problems if another picture follows that isn't preceded by a profile because the intention is to use the system profile for that picture. In that case, the currently effective profile is used, not the system profile.
enum {
   cmBeginProfile = 220,/* begins 1.0 profile */
   cmEndProfile   = 221,/* ends 2.x or 1.0 profile */
   cmEnableMatching= 222,/* turns on color matching */
   cmDisableMatching= 223,/* turns off color matching */
   cmComment      = 224 /* profile or profile identifier
                           is embedded */
};
Enumerator descriptions

cmBeginProfile
Indicates the beginning of a version 1.0 profile to embed. (To start a 2.x profile, you use cmComment.)
cmEndProfile
Signals end of the use of an embedded version 2.x or 1.0 profile.
cmEnableMatching
Turns on color matching for the ColorSync Manager. Do not nest cmEnableMatching and cmDisableMatching pairs.
cmDisableMatching
Turns off color matching for the ColorSync Manager. Do not nest cmEnableMatching and cmDisableMatching pairs. After the ColorSync Manager encounters this comment, it ignores all ColorSync-related picture comments until it encounters the next cmEnableMatching picture comment. At that point, the most recently used profile is reinstated.
cmComment
Provides information about a 2.x embedded profile or profile identifier reference. This picture comment is followed by a 4-byte selector identifying what follows: either a profile identifier reference follows, the beginning of a version 2.x embedded profile follows, more of the embedded profile data follows, or no embedded profile data follows because the end has been reached. See "Picture Comment Selectors for Embedding Profile Information" (page 3-18) for more information on the selectors. See "Profile Identifier Structure" (page 3-64) for more information on profile identifiers. For related sample code, see "Searching for a Profile That Matches a Profile Identifier" (page 4-73) in Advanced Color Imaging on the Mac OS.

Previous Book Contents Book Index Next

© Apple Computer, Inc.
11 NOV 1996