![]() |
CMUnflattenProfile |
||||
Header: | CMApplication.h | Carbon status: | Unsupported | |
Transfers a profile embedded in a graphics document to an independent disk file.
CMError CMUnflattenProfile ( FSSpec *resultFileSpec, CMFlattenUPP proc, void *refCon, Boolean *preferredCMMnotfound );
A pointer to a file specification. On return, the file specification identifies an independent disk file containing the extracted profile.
A pointer to a function provided by your application to receive the profile data from the CMM and store it in a file.
A pointer to a reference constant for application data which the CMM passes to the CMFlattenProcPtr function each time it calls the function.
Starting with ColorSync 2.5, the ColorSync Manager calls your transfer function directly, without going through the preferred, or any, CMM.
A pointer to a flag for whether the preferred CMM was found. On return, 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 CMM was used. Has the value false if the profiles preferred CMM is able to perform unflattening.
Starting with ColorSync 2.5, the ColorSync Manager calls your transfer function directly, without going through the preferred, or any, CMM. On return, the value of preferredCMMnotfound is guaranteed to be false.
Prior to version 2.5, the ColorSync Manager dispatches the CMUnflattenProfile function (passed by your application in the proc parameter) to the CMM specified by the profile that is to be transferred to a disk file. If the preferred CMM is unavailable or it does not support this function, then the default 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 be able to buffer at least 8 bytes of data. For a description of an unflattening function prototype, see CMFlattenProcPtr.
The CMM calls your version of the CMFlattenProcPtr 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 to close the profile and call the File Managers FSpDelete function to delete the file.
Starting with ColorSync version 2.5, the ColorSync Manager calls your transfer function directly, without going through the preferred, or any, CMM. As a result, the value returned in the preferredCMMnotfound parameter is guaranteed to be false.
Not supported in Carbon. Not available in Carbon.
Because this function unflattens only those profiles based on FSSpec structures, you should use NCMUnflattenProfile instead.
© 2000 Apple Computer, Inc. (Last Updated 7/17/2000)