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 / ColorSync Manager Functions
Accessing Profile Elements /


CMGetProfileHeader

Obtains the profile header for the specified profile.

pascal CMError CMGetProfileHeader (
CMProfileRef prof, 
CMAppleProfileHeader *header);
prof
A profile reference (page 3-63) to the profile whose header is to be copied.
header
A pointer to a profile header. On input, depending on the profile version, you may allocate a ColorSync 2.x or 1.0 header. On output, contains the profile data. For information about the ColorSync 2.x profile header structure, see "Profile Header Structure for ColorSync 2.x" (page 3-43). For information about the ColorSync 1.0 header, see "Profile Header Structure for ColorSync 1.0" (page 3-46) and the appendix, "ColorSync Manager Backward Compatibility" in Advanced Color Imaging on the Mac OS.
function result
A result code of type CMError. See "Result Codes" (page 3-174) for a list of ColorSync-specific result codes.
DISCUSSION
The CMGetProfileHeader function returns the header for a ColorSync 2.x or ColorSync 1.0 profile. To return the header, the function uses a union of type CMAppleProfileHeader (page 3-42), with variants for version 1.0 and 2.x headers.

A 32-bit version value is located at the same offset in either header. For ColorSync 2.x profiles, this is the profileVersion field. For ColorSync 1.0 profiles, this is the applProfileVersion field. You can inspect the value at this offset to determine the profile version, and interpret the remaining header fields accordingly.

SEE ALSO
To copy a profile header to a profile after you modify the header's contents, use the CMSetProfileHeader function (page 3-97).


Previous Book Contents Book Index Next

© Apple Computer, Inc.
11 NOV 1996