The heart of a color management computation is the color manipulation module (CMM), which executes the transformation algorithm.When you create a transformation, you may use one of several CMMs, which are implemented as dynamic shared objects. The Coloratura CMS serves as a dispatcher between your application and the CMMs.
This chapter discusses the tools the Coloratura CMS provides to examine available CMMs. These tools allow you to determine which CMM to specify when you call cmsCreateTfm() (see "Creating a Transform: cmsCreateTfm()"). You may want to examine available CMMs, for example, if you do not want to use the default CMM to perform a transformation, or if you do not want to, or are unable to, use a CMM determined by the profiles in a transformation via CMM_USE_PROFILE_CMM (see "Creating a Transform: cmsCreateTfm()").
These are the topics covered in this chapter:
The Coloratura CMS provides functions to identify the default CMM and to list all available CMMs. The data structure used to identify CMMs is an icSignature, which is declared in ic.h and described in the ICC Profile Format Specification.
A default CMM ships with the Coloratura CMS. To identify the current default CMM, call cmsGetDefaultCmm(), which returns an icSignature for the CMM. To obtain information about the CMM, you can call cmsGetCmmInfo(), discussed in "Getting Information About a CMM".
This is the prototype for cmsGetDefaultCmm():
int32 cmsGetDefaultCmm(CMSContext ctxt, icSignature *cmm); |
These are the arguments of cmsGetDefaultCmm():
ctxt | The context initialized by cmsOpen(). | |
cmm | The identifier of the CMM. |
The function cmsGetCmmList() supplies a list of available CMMs and the number of CMMs on the list. You may select from the list a preferred CMM to use when creating a transform. Recall that your application cannot use any CMM that you add after you call cmsOpen().
To obtain information about a particular CMM, you call cmsGetCmmInfo(), discussed in "Getting CMM Information: cmsGetCmmInfo()". Free the list of CMMs by calling cmsFreeCmmList().
This is the prototype for cmsGetCmmList():
int32 cmsGetCmmList(CMSContext ctxt, uint32 *count, icSignature **cmms); |
These are the arguments of cmsGetCmmList():
ctxt | The context initialized by cmsOpen(). | |
count | The number of CMMs available. | |
cmms | The list of identifiers for the CMMs. |
The function cmsFreeCmmList() frees the list of available CMMs returned by cmsGetCmmList().
This is the prototype for cmsFreeCmmList():
int32 cmsFreeCmmList(CMSContext ctxt, icSignature *cmms); |
These are the arguments of cmsFreeCmmList():
ctxt | The context initialized by cmsOpen(). | |
cmms | The list of identifiers for the CMMs. |
The Coloratura CMS provides a function, cmsGetCmmInfo() to return information about a CMM. The information is held in an enumerated data type, CMSInfoName.
Information about a CMM is held in the enumerated data type CMSInfoName.
This is the data type declaration for CMSInfoName:
typedef enum { CMS_CMM_NAME, CMS_CMM_VERSION, CMS_FW_VERSION, CMS_CAN_DO_IC, CMS_MULTIPLE_OK } CMSInfoName; |
The following lists the meanings of the information fields:
The function cmsGetCmmInfo() queries a CMM and returns identifying information.
This is the prototype for cmsGetCmmInfo():
int32 cmsGetCmmInfo(CMSContext ctxt, icSignature cmm, CMSInfoName name, uint32 *value); |
These are the arguments of cmsGetCmmInfo():
ctxt | The context initialized by cmsOpen(). | |
cmm | The CMM identifier obtained from cmsGetDefaultCmm() or cmsGetCmmList(). | |
name | The name of the information field for the CMM. | |
value | The value of the specified field. |
These are the error codes returned by cmsGetCmmInfo():
CMS_BAD_CONTEXT |
| |
CMS_CMM_NOT_AVAILABLE |
| |
CMS_MISSING |
|