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

Managing Color With ColorSync


Profile Identifier

The ColorSync Manager defines the CMProfileIdentifier type to store a profile identifier.


CMProfileIdentifier

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 or the flag values in an image without having to embed an entire copy of a profile. Rendering intent is described in Rendering Intent Values for Version 2.x Profiles and flag values are described in Flag Mask Definitions for Version 2.x Profiles .

IMPORTANT

A document containing an embedded profile identifier cannot necessarily be ported to different systems or platforms.

The ColorSync Manager provides the function routine NCMUseProfileComment 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 CMProfileSearchRef 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 descriptions

profileHeader
A version 2.x profile header structure. For more information, see CM2Header . In determining a profile match, all header fields are considered, except for primary platform, flags, and rendering intent.
calibrationDate
A structure of type Date and Time , 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.


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