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


Profile Identifier Structure

Embedding a profile in an image guarantees that the image can be rendered correctly on a different system. However, profiles can be large--as much as several hundred kilobytes. The ColorSync Manager defines a profile identifier structure, CMProfileIdentifier, that can identify a profile but that takes up much less space than a large profile.

The profile identifier structure contains a profile header, an optional calibration date, a profile description string length, and a variable-length profile description string. Your application might use an embedded profile identifier, for example, to change just the rendering intent (page 3-35) or flag values (page 3-29) in an image without having to embed an entire copy of a profile.

IMPORTANT
A document containing an embedded profile identifier cannot necessarily be ported to different systems or platforms.
The ColorSync Manager provides the NCMUseProfileComment routine (page 3-129) to embed profiles and profile identifiers in an open picture file. Your application can embed profile identifiers in place of entire profiles or in addition to them. A profile identifier can refer to an embedded profile or to a profile on disk.

The ColorSync Manager provides two routines for finding a profile identifier:

The descriptions of those functions provide information on searching algorithms. See also "Profile Search Result Reference" (page 3-63) for additional information on profile searching.

struct CMProfileIdentifier {
   CM2Header      profileHeader;       /* version 2.x profile header */
   CMDateTime     calibrationDate;     /* optional; may be set to 0 */
   unsigned long  ASCIIProfileDescriptionLen;/* length of following array */
   char           ASCIIProfileDescription[1];/* variable length */
};
typedef struct CMProfileIdentifier CMProfileIdentifier;
typedef CMProfileIdentifier *CMProfileIdentifierPtr;
Field Description
profileHeader
A version 2.x profile header structure. For more information, see "Profile Header Structure for ColorSync 2.x" (page 3-43). In determining a profile match, all header fields are considered, except for primary platform, flags, and rendering intent.
calibrationDate
A CMDateTime structure (page 3-8), which specifies year, month, day of month, hours, minutes, and seconds. This field is optional--when set to 0, it is not considered in determining a profile match. When nonzero, it is compared to the 'calt' tag data.
ASCIIProfileDescriptionLen
The length of the ASCII description string that follows.
ASCIIProfileDescription
The ASCII profile description string, as specified by the profile description tag.
The CMProfileIdentifierPtr type definition defines a pointer to a profile identifier structure.


Previous Book Contents Book Index Next

© Apple Computer, Inc.
11 NOV 1996