Contents

CMSetDefaultProfileBySpace

Sets the default profile for the specified color space.

Declaration

CMError CMSetDefaultProfileBySpace (
   OSType dataColorSpace,
   CMProfileRef prof
);

Parameters

  • 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 1560276 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.

Return Value

A CMError value. See Result Codes.

Overview

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.

See Also

Accessing Special Profiles