Important: The information in this document is obsolete and should not be used for new development.
CMUnflattenProfile
Transfers a profile embedded in a graphics document to an independent disk file.
pascal CMError CMUnflattenProfile ( FSSpec *resultFileSpec, CMFlattenUPP proc, void *refCon, Boolean *preferredCMMnotfound);
resultFileSpec
- A pointer to the profile file specification for an independent disk file.
proc
- A pointer to a function provided by your application to receive the profile data from the CMM and store in a file.
refCon
- A reference constant for application data which the CMM passes to the
MyColorSyncDataTransfer
function each time it calls the function.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 unflattening or does not support this function and the default Apple CMM was used. Has the valuefalse
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.
DISCUSSION
The ColorSync Manager dispatchesCMUnflattenProfile
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 theMyColorSyncDataTransfer
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 ManagerFSpDelete
function to delete the file.