Default CMMs
Description: C source code API documentation for the Oyranos project.
Keywords: Oyranos,Color Management,Color Management,ICC,CMS,C,doxygen,API,documentation

| Oyranos Color Management System API - Version 0.9.6

Macros | Enumerations | Functions
Default CMMs
Color » Defaults Handling

Provide logical and UI support for Color Matching Module selection. More...

Collaboration diagram for Default CMMs:

## Macros
#define | oyNAME_MODULE (oyNAME_DESCRIPTION + 2)
| the system specific module name; e.g. a library name More...
#define | oyNAME_REGISTRATION (oyNAME_DESCRIPTION + 3)
| the logical name for selection More...
#define | oyNAME_PATTERN (oyNAME_DESCRIPTION + 4)
| a logical name for registration search More...
#define | oyNAME_JSON (oyNAME_DESCRIPTION + 5)
| a logical name for registration search More...
#define | oySOURCE_FILTER 0x02
| use inbuild values More...
#define | oySOURCE_DATA 0x04
| use persistenly stored DB values More...

## Enumerations
enum | oyCMM_e { , oyCMM_CONTEXT, oyCMM_RENDERER, oyCMM_CONTEXT_FALLBACK, oyCMM_RENDERER_FALLBACK, oyCMM_END }
| CMM Types. More...

## Functions
uint32_t | oyICCProfileSelectionFlagsFromOptions (const char *db_base_key, const char *base_pattern, oyOptions_s *options, int select_core)
| Get valid profile selection flags from node options and fallbacks. More...
char ** | oyGetCMMs (oyCMM_e type, int name_type, uint32_t flags, oyAlloc_f allocate_func)
| Get a CMM list as strings. More...
char * | oyCMMRegistrationToName (const char *registration, oyCMM_e type, int name_type, uint32_t flags, oyAlloc_f allocate_func)
| Get a CMM string. More...
char * | oyCMMNameToRegistration (const char *name, oyCMM_e type, int name_type, uint32_t flags, oyAlloc_f allocate_func)
| Get a CMM registration from UI string. More...
char * | oyGetCMMPattern (oyCMM_e type, uint32_t flags, oyAlloc_f allocate_func)
| Get a default CMM. More...
int | oySetCMMPattern (oyCMM_e type, uint32_t flags, oySCOPE_e scope, const char *pattern)
| set a CMM as default More...
uint32_t | oyICCProfileSelectionFlagsFromRegistration (const char *registration)
| Get flags for oyProfile_FromFile() and friends. More...

## Detailed Description

Provide logical and UI support for Color Matching Module selection.

CMMs are modules, which do color calculations. The core part is responsible to do profile concatenation into one single color transform according to the provided options. It is loaded as a oyCMMapi4_s module. A policy module, implemented as a oyCMMapi9_s module, ensures the options follow the user and system settings. The renderer CMM (oyCMMapi7_s) module does the actual color transform, which is expressed as a device link for data exchange. So different core and renderer modules can easily be combined.

## Macro Definition Documentation

## ◆ oyNAME_JSON

#define oyNAME_JSON (oyNAME_DESCRIPTION + 5)

a logical name for registration search

Referenced by oyOptions_s::oyOptions_GetText().

## ◆ oyNAME_MODULE

#define oyNAME_MODULE (oyNAME_DESCRIPTION + 2)

the system specific module name; e.g. a library name

## ◆ oyNAME_PATTERN

#define oyNAME_PATTERN (oyNAME_DESCRIPTION + 4)

a logical name for registration search

Examples:
  image_display.cpp.

Referenced by oyConfig_s::oyConfig_Find(), oyConfig_s::oyConfig_Has(), oyFilterGraph_s::oyFilterGraph_PrepareContexts(), oyFilterNode_s::oyFilterNode_FromOptions(), oyOptions_s::oyOptions_Add(), oyOptions_s::oyOptions_FindData(), oyOptions_s::oyOptions_FindDouble(), and oyOptions_s::oyOptions_FindString().

## ◆ oyNAME_REGISTRATION

#define oyNAME_REGISTRATION (oyNAME_DESCRIPTION + 3)

the logical name for selection

## ◆ oySOURCE_DATA

#define oySOURCE_DATA 0x04

use persistenly stored DB values

## ◆ oySOURCE_FILTER

#define oySOURCE_FILTER 0x02

use inbuild values

## Enumeration Type Documentation

## ◆ oyCMM_e

enum oyCMM_e

CMM Types.

Enumerator
oyCMM_CONTEXT | parse profiles, options and create a device link
oyCMM_RENDERER | take a device link and color convert
oyCMM_CONTEXT_FALLBACK | parse profiles, options and create a device link
oyCMM_RENDERER_FALLBACK | take a device link and color convert
oyCMM_END | just for easen Gui design

## Function Documentation

## ◆ oyCMMNameToRegistration()

char* oyCMMNameToRegistration | ( | const char * | name,
|  | oyCMM_e | type,
|  | int | name_type,
|  | uint32_t | flags,
|  | oyAlloc_f | allocate_func
| ) |  |

Get a CMM registration from UI string.

Function oyCMMNameToRegistration Useful for matching UI strings to registration in e.g. oySetCMMRegistration().

Parameters

  name | a UI string
  type | the CMM type to set
  name_type | oyNAME_e or oyNAME_REGISTRATION or oyNAME_MODULE or oyNAME_PATTERN
  flags | unused
  allocate_func | user allocator

Returns
  a registration string to match a existing CMM

Version
  Oyranos: 0.9.6

Date
  2014/06/11

Since
  2014/06/11 (Oyranos: 0.9.6)

## ◆ oyCMMRegistrationToName()

char* oyCMMRegistrationToName | ( | const char * | registration,
|  | oyCMM_e | type,
|  | int | name_type,
|  | uint32_t | flags,
|  | oyAlloc_f | allocate_func
| ) |  |

Get a CMM string.

Function oyCMMRegistrationToName Useful for displaying UI strings.

Parameters

  registration | a registration string to match a existing CMM
  type | the CMM type to set
  name_type | oyNAME_e or oyNAME_PATTERN or oyNAME_REGISTRATION or oyNAME_MODULE
  flags | unused
  allocate_func | user allocator

Returns
  a UI string

Version
  Oyranos: 0.9.6

Date
  2014/06/11

Since
  2014/06/11 (Oyranos: 0.9.6)

## ◆ oyGetCMMPattern()

char* oyGetCMMPattern | ( | oyCMM_e | type,
|  | uint32_t | flags,
|  | oyAlloc_f | allocate_func
| ) |  |

Get a default CMM.

Function oyGetCMMPattern The stored value will contain a registration pattern string.

Parameters

  type | the CMM type to set
  flags | oySOURCE_DATA for persistent DB only settings, oySOURCE_FILTER for Oyranos inbuild default
  allocate_func | user allocator

Returns
  a registration pattern to match a CMM registration string

Version
  Oyranos: 0.9.6

Date
  2014/06/11

Since
  2014/06/11 (Oyranos: 0.9.6)

## ◆ oyGetCMMs()

char** oyGetCMMs | ( | oyCMM_e | type,
|  | int | name_type,
|  | uint32_t | flags,
|  | oyAlloc_f | allocate_func
| ) |  |

Get a CMM list as strings.

Function oyGetCMMs Useful for displaying UI strings.

Parameters

  type | the CMM type to set
  name_type | oyNAME_e or oyNAME_REGISTRATION or oyNAME_MODULE
  flags | unused
  allocate_func | user allocator

Returns
  a UI string

Version
  Oyranos: 0.9.6

Date
  2014/06/11

Since
  2014/06/11 (Oyranos: 0.9.6)

## ◆ oyICCProfileSelectionFlagsFromOptions()

uint32_t oyICCProfileSelectionFlagsFromOptions | ( | const char * | db_base_key,
|  | const char * | base_pattern,
|  | oyOptions_s * | options,
|  | int | select_core
| ) |  |

Get valid profile selection flags from node options and fallbacks.

Function oyICCProfileSelectionFlagsFromOptions A convenience function for oyFilterNode_FromOptions() .

Parameters

  db_base_key | the Oyranos DB basic key, which will appended by "context" and "renderer"; optional
  base_pattern | the basic pattern to search in the options and to be used as fallback
  options | the options to search in for the base_pattern and get "context" and "renderer" keys; optional
  select_core | 0 - select node, 1 - select core

Returns
  a registration string

Version
  Oyranos: 0.9.6

Date
  2014/07/30

Since
  2014/07/30 (Oyranos: 0.9.6)

## ◆ oyICCProfileSelectionFlagsFromRegistration()

uint32_t oyICCProfileSelectionFlagsFromRegistration | ( | const char * | registration | ) |

Get flags for oyProfile_FromFile() and friends.

supported are "icc_version_2" - OY_ICC_VERSION_2 and "icc_version_4" - OY_ICC_VERSION_4 .

Parameters

  registration | plain module registration; oyNAME_REGISTRATION

Returns
  profile selection flags

Version
  Oyranos: 0.9.6

Date
  2014/04/08

Since
  2014/04/08 (Oyranos: 0.9.6)

## ◆ oySetCMMPattern()

int oySetCMMPattern | ( | oyCMM_e | type,
|  | uint32_t | flags,
|  | oySCOPE_e | scope,
|  | const char * | pattern
| ) |  |

set a CMM as default

Function oySetCMMPattern The stored value will contain a registration pattern string, which shall fit a installed module registration string. However the caller has to check the existence of the CMM itself.

Parameters

  type | the CMM type to set
  flags | unused
  scope | oySCOPE_USER and oySCOPE_SYS are possible
  pattern | a registration pattern to match a installed CMM registration

Returns
  -1 in case of an issue, 0 for proper operation, 1 for error

Version
  Oyranos: 0.9.6

Date
  2014/06/10

Since
  2014/06/10 (Oyranos: 0.9.6)