PATHDocumentation > Mac OS 8 and 9 > Mutlimedia and Graphics > ColorSync Manager >

Managing Color With ColorSync


Color Worlds

The ColorSync Manager defines the following types for working with color worlds:


CMCWInfoRecord

Your application supplies a color world information record structure of type CMCWInfoRecord as a parameter to the CMGetCWInfo function to obtain information about a given color world. The ColorSync Manager uses this data structure to return information about the color world.

struct CMCWInfoRecord {
    unsigned long       cmmCount;   /* number of CMMs in the session; 1 or 2 */
    CMMInfoRecord       cmmInfo[2]; /* records describing CMM type and version */
};

Field descriptions

cmmCount
The number of CMMs involved in the color-matching session, either 1 or 2.
cmmInfo
An array containing two elements. Depending on the value that cmmCount returns, the cmmInfo array contains one or two records of type CMMInfoRecord reporting the CMM type and version number.
If cmmCount is 1, the first element of the array ( cmmInfo[0]) describes the CMM and the contents of the second element of the array ( cmmInfo[1] ) is undefined.
If cmmCount is 2, the first element of the array ( cmmInfo[0]) describes the source CMM and the second element of the array ( cmmInfo[1] ) describes the destination CMM.

CMWorldRef

Your application passes a color world reference as a parameter on calls to functions to perform color-matching and color-checking sessions and to dispose of the color world. When your application calls the function NCWNewColorWorld and the function CWConcatColorWorld to allocate a color world for color-matching and color-checking sessions, the ColorSync Manager returns a reference to the color world. The ColorSync Manager defines an abstract private data structure of type OpaqueCMWorldRef for the color world reference.

struct OpaqueCMWorldRef *CMWorldRef;

The color world is affected by the rendering intent, lookup flag, gamut flag, and quality flag of the profiles that make up the color world. For more information, see Rendering Intent Values for Version 2.x Profiles , Flag Mask Definitions for Version 2.x Profiles , and Quality Flag Values for Version 2.x Profiles .


CMConcatProfileSet

You can call the function NCWNewColorWorld to create a color world for operations such as color matching and color conversion. A color world is normally based on two profiles--source and destination. But it can include a series of profiles that describe the processing for a work-flow sequence, such as scanning, printing, and previewing an image. To create a color world that includes a series of profiles, you use the function CWConcatColorWorld .

You use an array to hold the set of profile references used in your operations. You provide this array in the profileSet field of the CMConcatProfileSet structure. You specify the profiles of the array in processing order--from source through destination.

The array identifies a concatenated profile set your application can use to establish a color world in which the sequential relationship among the profiles exists until your application disposes of the color world. Alternatively, you can create a device link profile composed of a series of linked profiles that remains intact and available for use again after your application disposes of the concatenated color world. In either case, you use a data structure of type CMConcatProfileSet to define the profile set.

A device link profile accommodates users who use a specific configuration requiring a combination of device profiles and possibly non-device profiles repeatedly over time.

To set up a color world that includes a concatenated set of profiles, your application uses the function CWConcatColorWorld , passing it a structure of type CMConcatProfileSet. The array you pass may contain a set of profile references or it may contain only the profile reference of a device link profile. To create a device link profile, your application calls the function CWNewLinkProfile , passing a structure of type CMConcatProfileSet .

struct CMConcatProfileSet {
    unsigned short      keyIndex;       /* 0-based index into array of profiles,
                                            specifying profile to use CMM for */
    unsigned short      count;          /* 1-based count of profiles in array;
                                            minimum is one profile */
    CMProfileRef        profileSet[1];  /* array of profile references */
};

Field descriptions

keyIndex
A zero-based index into the array of profile references identifying the profile whose CMM is used for the entire session. The profile's CMMType field identifies the CMM.
count
The one-based count of profiles in the profile array. A minimum of one profile is required.
profileSet
A variable-length array of profile references. The references must be in processing order from source to destination. The rules governing the types of profiles you can specify in a profile array differ depending on whether you are creating a profile set for the function CWConcatColorWorld or for the function CWNewLinkProfile . See the function descriptions for details.

CMMInfoRecord

Your application supplies an array containing two CMM information record structures of type CMMInfoRecord as a field of the CMCWInfoRecord structure. These structures allow the CMGetCWInfo function to return information about the one or two CMMs used in a given color world. Your application must allocate memory for the array. When your application calls the CMGetCWInfo function, it passes a pointer to the CMCWInfoRecord structure containing the array.

struct CMMInfoRecord {
    OSType      CMMType;    /* CMM signature */
    long        CMMVersion; /* CMM version */
};

Field descriptions

CMMType
The signature of the CMM as specified in the profile header's CMMType field. The CMGetCWInfo function returns this value.
CMMVersion
The version of the CMM. The CMGetCWInfo function returns this value.

© 1988-1999 Apple Computer, Inc. — (Last Updated 20 Jan 99)