![]() |
CMUpdateProfile |
||||
Header: | CMApplication.h | Carbon status: | Supported | |
Saves modifications to the specified profile.
CMError CMUpdateProfile ( CMProfileRef prof );
A profile reference of type CMProfileRef to the profile to update.
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.
Each time an application calls the function CMOpenProfile, the function creates a unique reference to the profile. An application can also duplicate a profile reference by passing a copy to another task. You cannot use the CMUpdateProfile function to update a profile if more than one reference to the profile existsattempting to do so will result in an error return. You can call the function CMGetProfileRefCount to determine the reference count for a profile reference.
You cannot use the CMUpdateProfile function to update a ColorSync 1.0 profile.
After you fill in tags and their data elements for a new profile created by calling the function CMNewProfile, 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 function CMCloseProfile. Otherwise, the changes are discarded.
To modify a profile header, you use the function CMGetProfileHeader and the function CMSetProfileHeader.
To set profile elements outside the header, you use the function CMSetProfileElement, the function CMSetProfileElementSize, and the function CMSetPartialProfileElement.
Supported in Carbon. Available in Carbon 1.0.2 and later when ColorSync 2.0 or later is present.
© 2000 Apple Computer, Inc. (Last Updated 7/17/2000)