Carbon


CMSetDefaultProfileBySpace

Header: CMApplication.h Carbon status: Supported

Sets the default profile for the specified color space.

CMError CMSetDefaultProfileBySpace (
    OSType dataColorSpace, 
    CMProfileRef prof
);
Parameter descriptions
dataColorSpace

A four-character identifier of type OSType. You pass a color space signature that identifies the color space you wish to set the default profile for. The currently-supported values are cmRGBData, cmCMYKData, cmLabData, and cmXYZData. These constants are a subset of the constants described in “Color Space Signatures”. If you supply a value that is not supported, the CMGetDefaultProfileBySpace function returns an error value of paramErr.

prof

A profile reference. Before calling CMSetDefaultProfileBySpace, set the reference to specify the default profile for the color space. The profile must be file-based; otherwise, the function returns a CMInvalidProfileLocation error.

DISCUSSION

The CMSetDefaultProfileBySpace function currently supports the RGB, CMYK, Lab, and XYZ color spaces. The signature constants for these color spaces (shown above with the dataColorSpace parameter description) are described in “Color Space Signatures”. Support for additional color spaces may be provided in the future. CMSetDefaultProfileBySpace returns a value of paramErr if you pass a color space constant it does not currently support.

Note that a user can also use the ColorSync control panel to specify a default profile for the RGB and CMYK color spaces.

AVAILABILITY

Supported in Carbon. Available in Carbon 1.0.2 and later when ColorSync 2.5 or later is present.


© 2000 Apple Computer, Inc. (Last Updated 7/17/2000)