Important: The information in this document is obsolete and should not be used for new development.
NCWNewColorWorld
Creates a color world for color matching based on the specified source and destination profiles.
pascal CMError NCWNewColorWorld ( CMWorldRef *cw, CMProfileRef src, CMProfileRef dst);
cw
- A pointer to a color world. On output, a reference to a matching session color world (page 3-66). You pass this reference to other functions that use the color world.
src
- A profile reference (page 3-63) to the source profile to use from the color-matching world. This profile's
dataColorSpace
element corresponds to the source data type for subsequent calls to functions that use this color world.dst
- A reference to the destination profile to use from the color-matching world. This profile's
dataColorSpace
element corresponds to the destination data type for subsequent calls to functions using this color world.- function result
- A result code of type CMError. See "Result Codes" (page 3-174) for a list of ColorSync-specific result codes.
DISCUSSION
You must set up a color world before your application can perform low-level color-matching or color-checking operations. To set up a color world in which these operations can occur, your application can call theNCWNewColorWorld
function after obtaining references to the profiles to use as the source and destination profiles for the color world. The following rules govern the types of profiles allowed:
You should call the
- You can specify a device profile or a color space conversion profile for the source and destination profiles.
- You can not specify a device-linked profile or an abstract profile for either the source profile or the destination profile.
- Only one profile can be a named color profile.
- You can specify the system profile explicitly by reference or by specifying the value
NULL
for either the source profile or the destination profile.
CMCloseProfile
function (page 3-71) for both the source and destination profiles to dispose of their references after execution of theNCWNewColorWorld
function.When a color-matching or color-checking function is called using this color world, to determine the CMM to use for the session, the ColorSync Manager follows the CMM selection arbitration scheme described in "Introduction to the ColorSync Manager" in Advanced Color Imaging on the Mac OS.
The quality flag setting--indicating normal mode, draft mode, or best mode--specified by the source profile prevails for the entire session. The quality flag setting is stored in the
flags
field of the profile header. See "Profile Header Structure for ColorSync 2.x" (page 3-43) and "Flag Mask Definitions for Version 2.x Profiles" (page 3-29) for more information on the use of flags. The rendering intent specified by the source profile also prevails for the entire session.For more information on color worlds, see "Concatenated Profile Set Structure" (page 3-49).
SEE ALSO
TheCWConcatColorWorld
function (page 3-110) also allocates a color world reference of typeCMWorldRef
.