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 Profiles /


CMFlattenProfile

Transfers a profile stored in an independent disk file to an external profile format that can be embedded in a graphics document.

pascal CMError CMFlattenProfile (
CMProfileRef prof, 
unsigned long flags, 
CMFlattenUPP proc,
void *refCon, 
Boolean *preferredCMMnotfound);
prof
A profile reference (page 3-63) to the profile to flatten.
flags
Reserved for future use.
proc
A pointer to a function that you provide to perform the low-level data transfer. For a description of the MyColorSyncDataTransfer function, see page 3-167.
refCon
A reference constant for application data which the color management module (CMM) passes to the MyColorSyncDataTransfer function each time it calls the function. For example, the reference constant may point to a data structure that holds information required by the MyColorSyncDataTransfer function to perform the data transfer, such as the reference number to a disk file in which the flattened profile is to be stored.
preferredCMMnotfound
A pointer to a Boolean value indicating whether the preferred CMM was found. On output, has the value true if the CMM specified by the profile was not available to perform flattening or does not support this function and the default Apple CMM was used. Has the value false if the profile's preferred CMM is able to perform flattening.
function result
A result code of type CMError. See "Result Codes" (page 3-174) for a list of ColorSync-specific result codes.
DISCUSSION
The ColorSync Manager dispatches the CMFlattenProfile function to the CMM specified by the profile whose reference you provide. If the preferred CMM is unavailable or it doesn't support this function, then the default Apple CMM is used.

The ColorSync Manager passes to the CMM the pointer to your profile-flattening function. The CMM calls your MyColorSyncDataTransfer function (page 3-167) to perform the actual data transfer.

SEE ALSO
To unflatten a profile embedded in a graphics document to an independent disk file, use the CMUnflattenProfile function (page 3-84).


Previous Book Contents Book Index Next

© Apple Computer, Inc.
11 NOV 1996