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 4 - ColorSync Manager Reference for Color Management Modules / Optional CMM-Defined Functions
/


MyCMNewLinkProfile

Handles the kCMMNewLinkProfile request by creating a single device-linked profile that includes the profiles in the specified profile set.

A CMM should respond to the kCMMNewLinkProfile request code, but it is not required to do so. The ColorSync Manager sends this request code to your CMM on behalf of an application that called the CWNewLinkProfile function. The ColorSync Manager dispatches this request to the Component Manager, which calls your CMM to service the request. A CMM typically responds to the kCMMNewLinkProfile request code by calling a CMM-defined function (for example, MyCMNewLinkProfile) to handle the request.

The MyCMNewLinkProfile function is a color management module-defined subroutine.

pascal CMError MyCMNewLinkProfile(
ComponentInstance CMSession,
CMProfileRef *prof,
const CMProfileLocation *targetLocation,
CMConcatProfileSet *profileSet);
CMsession
A handle to your CMM's storage for the instance of your component associated with the calling application or device driver.
prof
A pointer to a reference to a device-linked profile of type DeviceLink. Your MyCMNewLinkProfile function creates this profile, opens it to obtain a reference to it, and returns a pointer to the profile reference in this parameter. The profile may be a file-based profile or a handle-based profile. It must not be a pointer-based profile or a temporary profile.
targetLocation
A pointer to a location specification for the resulting profile, which your function returns. This is the file specification where you created the profile. For information on how to specify the location, see "Profile Location Union" (page 3-37) and "Profile Location Structure" (page 3-38).
profileSet
A pointer to an array of profiles (page 3-46). Your function must include these profiles in order in any device-linked profile it creates. The profiles in the array are in processing order--source through destination. The profileSet field of the data structure contains the array. For a description of the CMConcatProfileSet data structure, see "Concatenated Profile Set Structure" (page 3-46).
function result
A result code of type CMError. See "Result Codes" (page 3-172) for a list of ColorSync-specific result codes.
DISCUSSION
Your MyCMNewLinkProfile function must create a single device-linked profile of type DeviceLink that includes the profiles passed to you in the array pointed to by the profileSet parameter. For information about profiles of type DeviceLink, see "Profile Classes" (page 3-13). You must adhere to the requirements for device-linked profiles described in the same chapter.

After your function creates the device-linked profile, it must open the profile and return a reference to the profile in the prof parameter.

The International Color Consortium Profile Format Specification, version 2.x, document revision 3.x, also describes device-linked profiles. For information on how to obtain a copy of this document, contact the Developer Support organization of Apple Computer.


Previous Book Contents Book Index Next

© Apple Computer, Inc.
11 NOV 1996