PATHMac OS 8 and 9 Developer Documentation > Mutlimedia and Graphics > ColorSync Manager >

Managing Color With ColorSync


How the ColorSync Manager Selects a CMM

When a ColorSync function performs a color matching or color checking operation, it must determine which CMM to use. You typically pass source and destination profiles to a function, either directly or as part of a color world--an abstract private data structure you create by calling either the NCWNewColorWorld , the CWConcatColorWorld , or the CWNewLinkProfile function. When you call one of the latter two functions to create a color world, you use the CMConcatProfileSet data structure to specify a series of one or more profiles for the color world.

A profile header contains a CMMType field that specifies a CMM for that profile. For example, Signature of ColorSync's Default Color Management Module describes a signature for the CMMType field that specifies ColorSync's default CMM. When you set up a CMConcatProfileSet data structure to specify a series of profiles, you set the structure's keyIndex field to specify the zero-based index of the profile within the array of profiles whose CMM (as indicated by its CMMType field) ColorSync should use. A CMM specified by this mechanism is called a key CMM .

As we have seen, an operation may use more than one profile and there are multiple factors that can affect the choice of a CMM. To deal with these factors, ColorSync uses the following algorithm to select a CMM:

  1. Starting with version 2.5, a user can select a preferred CMM in the ColorSync control panel. If a user has chosen a preferred CMM, and if that CMM is available, ColorSync uses that CMM for all color checking and color matching operations the CMM can handle.
  2. If the preferred CMM is not available or cannot handle an operation, ColorSync uses the default CMM, as described in step 4.

  3. Prior to ColorSync 2.5, or if the user has not selected a preferred CMM with the ColorSync control panel, or has selected "Automatic," and if the ColorSync function takes a color world reference and the user has initialized the color world with CWConcatColorWorld or CWNewLinkProfile , ColorSync uses the key CMM.
  4. If the key CMM is not available or cannot handle an operation, ColorSync uses the default CMM, as described in step 4.

  5. Prior to ColorSync 2.5, or if the user has not selected a preferred CMM with the ColorSync control panel, or has selected "Automatic," and if the ColorSync function takes a color world reference and the user has initialized the color world with NCWNewColorWorld (and therefore without a CMConcatProfileSet structure), ColorSync uses an arbitrated CMM or CMMs--a CMM or CMMs selected from the source and destination profiles as described in Selecting a CMM by the Arbitration Algorithm .
  6. If an arbitrated CMM is not available or cannot handle an operation, ColorSync uses the default CMM, as described in step 4.

  7. If a CMM is not specified by one of the previous three steps, or if a specified CMM is not available or cannot handle an operation, ColorSync uses the default CMM --the robust CMM that is installed as part of the ColorSync extension. The default CMM supports all the required and optional functions defined by the ColorSync Manager, and is therefore a suitable CMM of last resort. The signature for the default CMM is specified by the constant kDefaultCMMSignature.

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