CMUnflattenProfileTransfers 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
MyColorSyncDataTransferfunction each time it calls the function.
- A pointer to a Boolean value indicating whether the preferred CMM was found. On output, has the value
trueif 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
falseif 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.
DISCUSSIONThe ColorSync Manager dispatches
CMUnflattenProfileto 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
CMUnflattenProfilefunction. For this reason, your function must buffer at least 8 bytes of data. For a description of the
MyColorSyncDataTransferunflattening function prototype, see page 3-167.
The CMM calls your
MyColorSyncDataTransferfunction 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
CMOpenProfileto open the profile and obtain a reference to it.
When you have finished using the profile, you must call the
CMCloseProfilefunction (page 3-71) to close the profile and call the File Manager
FSpDeletefunction to delete the file.