PATHMac OS 8 Developer Documentation > Mutlimedia and Graphics > ColorSync Manager >

Managing Color With ColorSync


Getting and Setting the System Profile File

The ColorSync Manager provides the following functions your code can call to identify a profile as the system profile or obtain a reference to that profile. These functions replace the capability provided by the ColorSync 1.0 Profile Responder. Setting Default Profiles describes changes in how the ColorSync Manager uses the system profile starting in version 2.5; it also describes use of the system profile in previous versions.


CMGetSystemProfile

Changed in ColorSync 2.5

Obtains a reference to the current system profile.

pascal CMError CMGetSystemProfile (CMProfileRef *prof);
prof
A pointer to a profile reference of type CMProfileRef . On output, a reference to the current system profile.
function result
A result code of type CMError . For possible values, see Result Codes for the ColorSync Manager .

DISCUSSION

Setting Default Profiles describes how the ColorSync Manager uses the system profile, both in version 2.5 and in previous versions. For example, the system profile may serve as the default profile for color operations for which no profile is specified.

The following functions allow you to pass NULL as a parameter value to specify the system profile as a source or destination profile:

Note that instead of passing NULL , you can pass a profile reference to a specific profile, including the system profile.

If you want to specify the system profile for any other function that requires a profile reference, such as CWConcatColorWorld and CWNewLinkProfile , you must use an explicit reference. You can obtain such a reference with the CMGetSystemProfile function.

There are other reasons you might need to obtain a reference to the current system profile. For example, your application might need to display the name of the current system profile to a user.

To identify the location of the physical file, call the function CMGetProfileLocation .

VERSION NOTES

Starting with version 2.5, use of the system profile has changed, as described in Setting Default Profiles . So rather than call CMGetSystemProfile to obtain a reference to the system profile, you may be able to obtain a profile that's more appropriate for the current operation by calling CMGetDefaultProfileBySpace to get the default profile for a color space or by calling CMGetProfileByAVID to get the profile for a specific display.

SEE ALSO

When your application has finished using the current system profile, it must close the reference to the profile by calling the function CMCloseProfile .


CMSetSystemProfile

Changed in ColorSync 2.5

Sets the current system profile.

pascal CMError CMSetSystemProfile (
                     const FSSpec *profileFileSpec);
profileFileSpec
function result
A result code of type CMError . For possible values, see Result Codes for the ColorSync Manager .

DISCUSSION

By default, a standard RGB profile is configured as the system profile. By calling the CMSetSystemProfile function, your application can specify a new system profile. You can configure only a display device profile as the system profile.

VERSION NOTES

Starting with version 2.5, use of the system profile has changed, as described in Setting Default Profiles .

The function CMSetSystemProfile does not retrieve video card gamma data (introduced in ColorSync version 2.5) to set the video card; use the function CMSetProfileByAVID instead.

SEE ALSO

The FSSpec data type you use to specify the profile file location is described in Inside Macintosh: Files.


© 1988-1999 Apple Computer, Inc. — (Last Updated 20 Jan 99)