Important: The information in this document is obsolete and should not be used for new development.
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" in Advanced Color Imaging on the Mac OS.The ColorSync Manager defines the following optional request codes:
enum { kCMMMatchPixMap = 3, /* match colors of pixel map image */ kCMMCheckPixMap = 4, /* gamut-check pixel 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
myPixMapparameter 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 previouskNCMMInit,kCMMInit, orkCMMConcatInitrequest to your CMM. For more information about how your CMM should respond to this request code, see theMyCMMatchPixMapfunction (page 4-27).kCMMCheckPixMap- In response to this request code, your CMM must check the colors of the pixel map image pointed to by the
myPixMapparameter 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 previouskNCMMInit,kCMMInit, orkCMMConcatInitrequest to your CMM. For more information about how your CMM should respond to this request code, see theMyCMCheckPixMapfunction (page 4-30).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
profileSetparameter. 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 theMyCMConcatInitfunction (page 4-25).kCMMValidateProfile- In response to this request code, your CMM should test the profile whose reference is passed in the
profparameter 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 theMyCMMValidateProfilefunction (page 4-17).kCMMMatchBitmap- In response to this request code, your CMM must match the colors of the source image bitmap pointed to by the
bitmapparameter to the gamut of the destination device using the profiles specified by a previouskNCMMInit,kCMMInit, orkCMMConcatInitrequest to your CMM. For more information about how your CMM should respond to this request code, see theMyCMMatchBitmapfunction (page 4-18).kCMMCheckBitmap- In response to this request code, your CMM must check the colors of the source image bitmap pointed to by the
bitmapparameter against the gamut of the destination device using the profiles specified by a previouskNCMMInit,kCMMInit, orkCMMConcatInitrequest to your CMM. For more information about how your CMM should respond to this request code, see theMyCMCheckBitmapfunction (page 4-22).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
srcProfparameter 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 theMyCMMGetPS2ColorSpacefunction (page 4-34).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
srcProfparameter 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 theMyCMMGetPS2ColorRenderingIntentfunction (page 4-37).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
MyCMMGetPS2ColorRenderingfunction (page 4-39).kCMMFlattenProfile- In response to this request code, your CMM must extract the profile data from the profile to flatten, identified by the
profparameter, and pass the profile data to the function specified in theprocparameter. For more information about how your CMM should respond to this request code, see theMyCMMFlattenProfilefunction (page 4-45).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
MyCMMUnflattenProfilefunction (page 4-47).kCMMNewLinkProfile- In response to this request code, your CMM must create a single device-linked profile of type
DeviceLinkthat includes the profiles passed to you in the array pointed to by theprofileSetparameter. For more information about how your CMM should respond to this request code, see theMyCMNewLinkProfilefunction (page 4-33).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. For more information about how your CMM should respond to this request code, see the
MyCMMGetPS2ColorRenderingVMSizefunction (page 4-42).- kCMMGetNamedColorInfo
- In response to this request code, your CMM extracts named color data from the profile whose reference is passed in the
srcProfparameter. For more information, see theMyCMMGetNamedColorInfofunction (page 4-50).- 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
profparameter. For more information, see the MyCMMGetNamedColorValue function (page 4-51).- 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
profparameter. For more information, see the MyCMMGetIndNamedColorValue function (page 4-53).- 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
profparameter. For more information, see the MyCMMGetNamedColorIndex function (page 4-54).- 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
profparameter. For more information, see the MyCMMGetNamedColorName function (page 4-55).