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 /


CMUpdateProfile

Saves modifications to the specified profile.

pascal CMError CMUpdateProfile (CMProfileRef prof);
prof
A profile reference (page 3-63) to the profile to update.
function result
A result code of type CMError. See "Result Codes" (page 3-174) for a list of ColorSync-specific result codes.
DISCUSSION
The CMUpdateProfile function makes permanent any changes or additions your application has made to the profile identified by the profile reference, if no other references to that profile exist.

The ColorSync Manager maintains a modified flag to track whether a profile has been modified. After updating a profile, the CMUpdateProfile function sets the value of the modified flag for that profile to false.

There are several situations in which you might call CMUpdateProfile.

You can call the CMGetProfileRefCount function (page 3-79) to determine the reference count for a profile reference. If the count is greater than one, you cannot update the profile.

You cannot use the CMUpdateProfile function to update a ColorSync 1.0 profile. For information on updating a ColorSync 1.0 profile, see the appendix, "ColorSync Manager Backward Compatibility," in Advanced Color Imaging on the Mac OS.

After you fill in tags and their data elements for a new profile created by calling the CMNewProfile function (page 3-75), you must call the CMUpdateProfile function to write the element data to the new profile.

If you modify an open profile, you must call CMUpdateProfile to save the changes to the profile file before you call the CMCloseProfile function (page 3-71). Otherwise, the changes are discarded.

To modify a profile header, you use the CMGetProfileHeader function (page 3-88) and the CMSetProfileHeader function (page 3-97).

To set profile elements outside the header, you use the CMSetProfileElement function (page 3-96), the CMSetProfileElementSize function (page 3-93), and the CMSetPartialProfileElement function (page 3-94).


Previous Book Contents Book Index Next

© Apple Computer, Inc.
11 NOV 1996