Oyranos Color Management System API - Version 0.9.6
Macros | Enumerations | Functions
Default CMMs

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

#define oyNAME_JSON   (oyNAME_DESCRIPTION + 5)

a logical name for registration search

Referenced by oyOptions_s::oyOptions_GetText().

#define oyNAME_MODULE   (oyNAME_DESCRIPTION + 2)

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

#define oyNAME_PATTERN   (oyNAME_DESCRIPTION + 4)
#define oyNAME_REGISTRATION   (oyNAME_DESCRIPTION + 3)
#define oySOURCE_DATA   0x04
#define oySOURCE_FILTER   0x02

use inbuild values

Referenced by oyGetCMMPattern().

Enumeration Type Documentation

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

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
namea UI string
typethe CMM type to set
name_typeoyNAME_e or oyNAME_REGISTRATION or oyNAME_MODULE or oyNAME_PATTERN
flagsunused
allocate_funcuser 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)

References oyCMM_END, oyNAME_REGISTRATION, and oyCMMapiFilter_s::release.

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
registrationa registration string to match a existing CMM
typethe CMM type to set
name_typeoyNAME_e or oyNAME_PATTERN or oyNAME_REGISTRATION or oyNAME_MODULE
flagsunused
allocate_funcuser allocator
Returns
a UI string
Version
Oyranos: 0.9.6
Date
2014/06/11
Since
2014/06/11 (Oyranos: 0.9.6)

References oyCMM_END, oyNAME_REGISTRATION, and oyCMMapiFilter_s::release.

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
typethe CMM type to set
flagsoySOURCE_DATA for persistent DB only settings, oySOURCE_FILTER for Oyranos inbuild default
allocate_funcuser 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)

References oyCMM_END, oyGetPersistentString(), oySCOPE_USER_SYS, oySOURCE_DATA, and oySOURCE_FILTER.

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
typethe CMM type to set
name_typeoyNAME_e or oyNAME_REGISTRATION or oyNAME_MODULE
flagsunused
allocate_funcuser allocator
Returns
a UI string
Version
Oyranos: 0.9.6
Date
2014/06/11
Since
2014/06/11 (Oyranos: 0.9.6)

References oy_debug, oyCMM_CONTEXT, oyCMM_CONTEXT_FALLBACK, oyCMMapiFilters_s::oyCMMapiFilters_Count(), oyCMMapiFilters_s::oyCMMapiFilters_Get(), oyCMMapiFilters_s::oyCMMapiFilters_Release(), oyOBJECT_CMM_API4_S, oyOBJECT_CMM_API7_S, and oyStruct_s::oyStructTypeToText().

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_keythe Oyranos DB basic key, which will appended by "context" and "renderer"; optional
base_patternthe basic pattern to search in the options and to be used as fallback
optionsthe options to search in for the base_pattern and get "context" and "renderer" keys; optional
select_core0 - 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)

References oyFilterNode_s::oyFilterNode_FromOptions(), oyFilterNode_s::oyFilterNode_GetRegistration(), oyFilterNode_s::oyFilterNode_Release(), and 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
registrationplain 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)

References OY_ICC_VERSION_2, and OY_ICC_VERSION_4.

Referenced by oyICCProfileSelectionFlagsFromOptions().

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
typethe CMM type to set
flagsunused
scopeoySCOPE_USER and oySCOPE_SYS are possible
patterna 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)

References oyCMM_END, and oySetPersistentString().