![]() |
PATH![]() |
![]() ![]() |
A color world is a reference to a private ColorSync structure that represents a unique color-matching session. Although profiles can be large, a color world is a compact representation of the mapping needed to match between profiles. Conceptually, you can think of a color world as a sort of "matrix multiplication" of two or more profiles that distills all the information contained in the profiles into a fast, multidimensional lookup table.
For the ColorSync Manager general purpose functions, a color world characterizes how the color-matching session will occur based on information contained in the profiles that you supply when your application sets up the color world. When Color Matching Occurs describes both general purpose and QuickDraw-specific ColorSync functions for color matching. Your application can define a color world for color transformations between a source profile and a destination profile, or it can define a color world for color transformations between a series of concatenated profiles.
For the general purpose ColorSync Manager functions, a color world is the equivalent of the ColorSync Manager QuickDraw-based functions' source and destination profiles. From your application's perspective, the difference in specifying profiles for the general purpose functions is that instead of calling a function and passing it references to the profiles for the session, first you must create a color world using those profile references and pass the color world to the function. This general purpose interface provides better performance during color-matching.
Your application calls the
NCWNewColorWorld
function to set up a simple color world for color transformations involving two profiles--a source profile and a destination profile--and the function returns a reference to the color world it creates. Setting up a color world for color processing involving a series of
concatenated
profiles or a single device link profile, which contains a series of profiles, is slightly more complex. Here are the steps you take:
For information describing how to obtain references to the profiles for the color world, see Obtaining Profile References .
Before your application calls the function
CWConcatColorWorld
to create the color world, you must establish the profile set. The ColorSync Manager defines the following data structure of type
CMConcatProfileSet
that you use to specify the profile set:
struct CMConcatProfileSet {
unsigned short keyIndex;
unsigned short count;
CMProfileRef profileSet[1];
};
Your application also uses the CMConcatProfileSet data structure to define a profile set for a device link profile. See Creating and Using Device Link Profiles for more information.
Your application creates an array that contains references to the profiles for the color world, specifying these references in processing order. You specify the one-based number of profile references in the array by setting the value of the CMConcatProfileSet.count field. You assign the profile array to the CMConcatProfileSet.profileSet field.
The ColorSync Manager defines rules governing the types of profiles you can specify in a profile array. These rules differ depending on whether you are creating a profile set to create a device link profile or to create a concatenated color world. For a list of the rules defining the types of profiles you can use for these purposes, see
CWNewLinkProfile
and
CWConcatColorWorld
.
Each of the profiles whose references you give identifies a CMM for color processing involving that profile. To perform color transformation using a series of profiles, the ColorSync Manager uses only one CMM. You use the CMConcatProfileSet.keyIndex field to identify the index into the array corresponding to the profile whose specified CMM is to be used. The array is zero based, so you must specify the CMConcatProfileSet.keyIndex value as a number in the range of 0 to count - 1, where count is the number of elements in the array.
See How the ColorSync Manager Selects a CMM for a complete description of the ColorSync algorithm for selecting a CMM.
You pass the CWConcatColorWorld function a parameter of type CMConcatProfileSet to specify the profile array, and the function returns a color world reference. To perform color matching or gamut checking using the profiles comprising a color world, you call the general purpose function passing it the reference to the color world.
Using a device link profile for the general purpose functions entails additional steps, described in Creating and Using Device Link Profiles .