PATHDocumentation > Mac OS 8 and 9 > Mutlimedia and Graphics > ColorSync Manager >

Managing Color With ColorSync


Optional Request Codes

Your CMM should respond to the ColorSync Manager request codes defined by the following enumeration, but it is not required to do so. For a description of how your CMM can respond to ColorSync Manager requests from the Component Manager, see Developing Color Management Modules .

The ColorSync Manager defines the following optional request codes:

enum {
    kCMMMatchPixMap                 = 3,    /* match colors of pix map image */
    kCMMCheckPixMap                 = 4,    /* gamut-check pix map colors */
    kCMMConcatenateProfiles         = 5,    /* concatenate profiles (for backward
                                                compatibility with ColorSync 1.0) */
    kCMMConcatInit                  = 7,    /* init prior to concat color worlds */
    kCMMValidateProfile             = 8,    /* validate profile elements */
    kCMMMatchBitmap                 = 9,    /* match colors of bit map image */
    kCMMCheckBitmap                 = 10,   /* gamut-check bit map colors */
    kCMMGetPS2ColorSpace            = 11,   /* get PostScript color space */
    kCMMGetPS2ColorRenderingIntent  = 12,   /* get PostScript rendering intent */
    kCMMGetPS2ColorRendering        = 13,   /* get PostScript color rendering
                                                dictionary */
    kCMMFlattenProfile              = 14,   /* extract data from profile */
    kCMMUnflattenProfile            = 15,   /* create file for unflattened data */
    kCMMNewLinkProfile              = 16,   /* create linked profile */
    kCMMGetPS2ColorRenderingVMSize  = 17,   /* get PostScript version 2 color rendering
                                                dictionary virtual memory size */
    kCMMGetNamedColorInfo           = 70,   /* get named color information */
    kCMMGetNamedColorValue          = 71,   /* get color values for a named color */
    kCMMGetIndNamedColorValue       = 72,   /* get index for a named color */
    kCMMGetNamedColorIndex          = 73,   /* get named color index from name */
    kCMMGetNamedColorName           = 74    /* get named color name from index */
};

Constant descriptions

kCMMMatchPixMap
In response to this request code, your CMM must match the colors of the pixel map image pointed to by the myPixMap parameter to the gamut of the destination device, replacing the original pixel colors with their corresponding colors as specified in the data color space of the destination device's color gamut. To perform the matching, you use the profiles specified by a previous kNCMMInit , kCMMInit , or kCMMConcatInit request to your CMM. For more information about how your CMM should respond to this request code, see the function CMMatchPixMap .
kCMMCheckPixMap
In response to this request code, your CMM must check the colors of the pixel map image pointed to by the myPixMap parameter against the gamut of the destination device to determine if the pixel colors are within the gamut of the destination device and report the results. To perform the check, you use the profiles specified by a previous kNCMMInit , kCMMInit , or kCMMConcatInit request to your CMM. For more information about how your CMM should respond to this request code, see the function CMCheckPixMap .
kCMMConcatenateProfiles
This request code is for backward compatibility with ColorSync 1.0.
kCMMConcatInit
In response to this request code, your CMM should initialize any private data your CMM will need for a color session involving the set of profiles specified by the profile array pointed to by the profileSet parameter. Your function should also initialize any additional private data needed in handling subsequent calls pertaining to this component instance. For more information about how your CMM should respond to this request code, see the function CMConcatInit .
kCMMValidateProfile
In response to this request code, your CMM should test the profile whose reference is passed in the prof parameter to determine if the profile contains the minimum set of elements required for a profile of its type. For more information about how your CMM should respond to this request code, see the function CMMValidateProfile .
kCMMMatchBitmap
In response to this request code, your CMM must match the colors of the source image bitmap pointed to by the bitmap parameter to the gamut of the destination device using the profiles specified by a previous kNCMMInit , kCMMInit , or kCMMConcatInit request to your CMM. For more information about how your CMM should respond to this request code, see the function CMMatchBitmap .
kCMMCheckBitmap
In response to this request code, your CMM must check the colors of the source image bitmap pointed to by the bitmap parameter against the gamut of the destination device using the profiles specified by a previous kNCMMInit , kCMMInit , or kCMMConcatInit request to your CMM. For more information about how your CMM should respond to this request code, see the function CMCheckBitmap .
kCMMGetPS2ColorSpace
In response to this request code, your CMM must obtain or derive the color space element data from the source profile whose reference is passed to your function in the srcProf parameter and pass the data to a low-level data-transfer function supplied by the calling application or device driver. For more information about how your CMM should respond to this request code, see the function CMMGetPS2ColorSpace .
kCMMGetPS2ColorRenderingIntent
In response to this request code, your CMM must obtain the color-rendering intent from the header of the source profile whose reference is passed to your function in the srcProf parameter and then pass the data to a low-level data-transfer function supplied by the calling application or device driver. For more information about how your CMM should respond to this request code, see the function CMMGetPS2ColorRenderingIntent .
kCMMGetPS2ColorRendering
In response to this request code, your CMM must obtain the rendering intent from the source profile's header and generate the color rendering dictionary (CRD) data from the destination profile, and then pass the data to a low-level data-transfer function supplied by the calling application or device driver. For more information about how your CMM should respond to this request code, see the function CMMGetPS2ColorRendering .
kCMMFlattenProfile
In response to this request code, your CMM must extract the profile data from the profile to flatten, identified by the prof parameter, and pass the profile data to the function specified in the proc parameter. For more information about how your CMM should respond to this request code, see the function CMMFlattenProfile .
Changed in ColorSync 2.5: Starting with ColorSync version 2.5, the ColorSync Manager calls the function provided by the calling program directly, without going through the preferred, or any, CMM. Your CMM only needs to handle this request code for versions of ColorSync prior to version 2.5.
kCMMUnflattenProfile
In response to this request code, your CMM must create a temporary file in which to store the profile data you receive from the low-level data-transfer function supplied by the calling application or driver. Your function must return the file specification. For more information about how your CMM should respond to this request code, see the function CMMUnflattenProfile .
Changed in ColorSync 2.5: Starting with ColorSync version 2.5, the ColorSync Manager calls the function provided by the calling program directly, without going through the preferred, or any, CMM. Your CMM only needs to handle this request code for versions of ColorSync prior to version 2.5.
kCMMNewLinkProfile
In response to this request code, your CMM must create a single device link profile of type DeviceLink that includes the profiles passed to you in the array pointed to by the profileSet parameter. For more information about how your CMM should respond to this request code, see the function CMNewLinkProfile .
kCMMGetPS2ColorRenderingVMSize
In response to this request code, your CMM must obtain or assess the maximum virtual memory (VM) size of the color rendering dictionary (CRD) specified by the destination profile. You must return the size of the CRD for the rendering intent specified by the source profile. See the function CMMGetPS2ColorRenderingVMSize for more information about how your CMM should respond to this request code.
kCMMGetNamedColorInfo
In response to this request code, your CMM extracts named color data from the profile whose reference is passed in the srcProf parameter. For more information, see the function CMMGetNamedColorInfo .
kCMMGetNamedColorValue
In response to this request code, your CMM extracts device and profile connection space (PCS) color values for a specific color name from the profile whose reference is passed in the prof parameter. For more information, see the function CMMGetNamedColorValue .
kCMMGetIndNamedColorValue
In response to this request code, your CMM extracts device and PCS color values for a specific named color index from the profile whose reference is passed in the prof parameter. For more information, see the function CMMGetIndNamedColorValue .
kCMMGetNamedColorIndex
In response to this request code, your CMM extracts a named color index for a specific color name from the profile whose reference is passed in the prof parameter. For more information, see the function CMMGetNamedColorIndex .
kCMMGetNamedColorName
In response to this request code, your CMM extracts a named color name for a specific named color index from the profile whose reference is passed in the prof parameter. For more information, see the function CMMGetNamedColorName .

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