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 /


Transfers a profile embedded in a graphics document to an independent disk file.

pascal CMError CMUnflattenProfile (
FSSpec *resultFileSpec, 
CMFlattenUPP proc,
void *refCon,
Boolean *preferredCMMnotfound);
A pointer to the profile file specification for an independent disk file.
A pointer to a function provided by your application to receive the profile data from the CMM and store in a file.
A reference constant for application data which the CMM passes to the MyColorSyncDataTransfer function each time it calls the function.
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 unflattening 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 unflattening.
function result
A result code of type CMError. See "Result Codes" (page 3-174) for a list of ColorSync-specific result codes.
The ColorSync Manager dispatches CMUnflattenProfile to the CMM specified by the profile to be transferred to a disk file. If the preferred CMM is unavailable or it doesn't support this function, then the default Apple CMM is used.

The ColorSync Manager calls your unflattening function to identify the CMM to which it dispatches the CMUnflattenProfile function. For this reason, your function must buffer at least 8 bytes of data. For a description of the MyColorSyncDataTransfer unflattening function prototype, see page 3-167.

The CMM calls your MyColorSyncDataTransfer function to transfer the profile data from the graphics document to an independent disk file.

Before you can obtain a profile reference to a profile that was embedded in a graphics document, you must use this function to unflatten the profile. Then you can call CMOpenProfile to open the profile and obtain a reference to it.

When you have finished using the profile, you must call the CMCloseProfile function (page 3-71) to close the profile and call the File Manager FSpDelete function to delete the file.

Previous Book Contents Book Index Next

© Apple Computer, Inc.
11 NOV 1996