Important: The information in this document is obsolete and should not be used for new development.
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 theCWConcatColorWorld
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 theCMConcatProfileSet
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'sCMMType
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
- The first and last profiles you specify in the profiles array for a device-linked profile must be device profiles.
- You cannot specify a named color profile.
- You cannot include another device-linked profile in the series of profiles you specify in the profiles array.
- The only way to use a device-linked profile is to pass it to the
CWConcatColorWorld
function as the sole profile specified in theprofileSet
array.- You cannot embed a device-linked profile in an image.
- You cannot specify
NULL
to indicate the system profile.
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 theCWNewLinkProfile
function.For a brief description of a color world, see "Matching Colors Using Low-Level Functions Without QuickDraw" (page 3-107).