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 3 - ColorSync Manager Reference for Applications and Device Drivers / ColorSync Manager Functions
Matching Colors Using Low-Level Functions Without QuickDraw /


CWNewLinkProfile

Creates a device-linked profile based on the specified set of profiles.

pascal CMError CWNewLinkProfile (
CMProfileRef *prof,
const CMProfileLocation *targetLocation,
CMConcatProfileSet *profileSet);
prof
A pointer to a profile reference (page 3-63). On output, points to the new device-linked profile.
targetLocation
On output, the location specification for the resulting profile. A device-linked profile cannot be a temporary profile: that is, it cannot have a location type of cmNoProfileBase.
profileSet
On output, an array of profiles describing the processing to carry out. The array is in processing order--source through destination. For a description of the CMConcatProfileSet data type, see "Profile Header Structure for ColorSync 1.0" (page 3-46).
function result
A result code of type CMError. See "Result Codes" (page 3-174) for a list of ColorSync-specific result codes.
DISCUSSION
You can use this function to create a new single profile containing a set of profiles and pass the device-linked profile to the CWConcatColorWorld function (page 3-110) instead of specifying each profile in an array. A device-linked profile provides a means of storing in concatenated format a series of device profiles and nondevice profiles that are used repeatedly in the same sequence.

The zero-based keyIndex field of the CMConcatProfileSet data structure, described in "Profile Header Structure for ColorSync 1.0" (page 3-46), specifies the index of the profile within the device-linked profile whose preferred CMM is used for the entire color-matching or color-checking session. The profile header's CMMType field specifies the CMM. This CMM will fetch the profile elements necessary for the session.

The quality flag setting--indicating normal mode, draft mode, or best mode--specified by the first profile prevails for the entire session; the quality flags of profiles that follow in the sequence are ignored. The quality flag setting is stored in the flag field of the profile header. See "Profile Header Structure for ColorSync 2.x" (page 3-43) for more information on the use of flags.

The rendering intent specified by the first profile is used to color match to the second profile, the rendering intent specified by the second profile is used to color match to the third profile, and so on through the series of concatenated profiles.

The following rules govern the content and use of a device-linked profile:

When your application is finished with the device-linked profile, it must close the profile with the CMCloseProfile function (page 3-71).

This function maintains privately all the profile information required by the color world for color-matching and color-checking sessions. Therefore, you should call the CMCloseProfile function for each profile used to build a device-linked profile to dispose of their references after executing the CWNewLinkProfile function.

For a brief description of a color world, see "Matching Colors Using Low-Level Functions Without QuickDraw" (page 3-107).


Previous Book Contents Book Index Next

© Apple Computer, Inc.
11 NOV 1996