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 2 - Color Picker Manager Reference /
Color Picker-Defined Functions / Responding to Requests to Return and Set Color Picker Information


MySetProfile

Color picker-defined subroutine that handles a kSetProfile request.

If you create a color picker, it must respond to the kSetProfile request code. For color-matching purposes, the Color Picker Manager sends this code to set the destination profile used by your color picker. A color picker responds to the kSetProfile request code by calling a color picker-defined subroutine (for example, MySetProfile) to handle the request.

pascal ComponentResult MySetProfile (
PickerStorageHndl storage, 
CMProfileHandle profile);
storage
A handle to your color picker's global data.
profile
A handle to a ColorSync 1.0 profile (that is, a CMProfile structure).
DISCUSSION
Your MySetProfile function should set the destination profile to the one specified in the profile parameter.

Your function should return noErr if successful, or an appropriate result code otherwise.

SPECIAL CONSIDERATIONS
This version of the Color Picker Manager uses ColorSync 1.0 profiles only. The ColorSync 1.0 profile is a handle-based profile. The profile format is defined by Apple Computer. You cannot use version 2.x profiles, which are identified by profile references, with this version of the Color Picker Manager. ColorSync 1.0 profiles typically reside in the ColorSyncTM Profiles folder (within the Preferences folder of the System Folder). They may also be embedded with the images to which they pertain in graphics files. The appendix "ColorSync Manager Backward Compatibility" in Advanced Color Imaging on the Mac OS provides information about the relationship between the ColorSync Manager version 2.x and ColorSync 1.0 profiles, which you may find useful.

SEE ALSO
Listing 2-30 (page 2-45) in Advanced Color Imaging on the Mac OS illustrates how to implement this function.


Previous Book Contents Book Index Next

© Apple Computer, Inc.
11 NOV 1996