Oyranos  0.9.7
Oyranos is a full featured Color Management System
Macros | Functions | Variables
oyranos_cmm_lcm2.c File Reference

littleCMS CMM module for Oyranos More...

#include <lcms2.h>
#include <stdarg.h>
#include <stdlib.h>
#include "oyArray2d_s_.h"
#include "oyCMM_s.h"
#include "oyCMMapi4_s.h"
#include "oyCMMapi4_s_.h"
#include "oyCMMapi6_s_.h"
#include "oyCMMapi7_s.h"
#include "oyCMMapi7_s_.h"
#include "oyCMMapi10_s_.h"
#include "oyCMMui_s_.h"
#include "oyConnectorImaging_s_.h"
#include "oyImage_s.h"
#include "oyProfiles_s.h"
#include "oyStructList_s.h"
#include "oyranos_cmm.h"
#include "oyranos_config_internal.h"
#include "oyranos_generic.h"
#include "oyranos_helper.h"
#include "oyranos_i18n.h"
#include "oyranos_io.h"
#include "oyranos_image.h"
#include "oyranos_object_internal.h"
#include "oyranos_string.h"
#include <math.h>
#include <string.h>
#include "lcm2_profiler.c"

Macros

#define l2cmsPROOF_LUT_GRID_RASTER   53
 

Functions

void l2cmsErrorHandlerFunction (cmsContext ContextID, cmsUInt32Number ErrorCode, const char *ErrorText)
 
int l2cmsCMMMessageFuncSet (oyMessage_f l2cms_msg_func)
 
l2cmsTransformWrap_s * l2cmsTransformWrap_Set_ (cmsHTRANSFORM xform, icColorSpaceSignature color_in, icColorSpaceSignature color_out, oyPixel_t oy_pixel_layout_in, oyPixel_t oy_pixel_layout_out, oyPointer_s *oy)
 fill a l2cmsTransformWrap_s struct More...
 
int l2cmsCMMTransform_GetWrap_ (oyPointer_s *cmm_ptr, l2cmsTransformWrap_s **s)
 convert to l2cms transform wrapper struct More...
 
int l2cmsCMMDeleteTransformWrap (oyPointer *wrap)
 
l2cmsProfileWrap_s * l2cmsCMMProfile_GetWrap_ (oyPointer_s *cmm_ptr)
 convert to l2cms profile wrapper struct More...
 
int l2cmsCMMProfileReleaseWrap (oyPointer *p)
 release a l2cms profile wrapper struct More...
 
int l2cmsCMMCheckPointer (oyPointer_s *cmm_ptr, const char *resource)
 
int oyPixelToLcm2PixelLayout_ (oyPixel_t pixel_layout, icColorSpaceSignature color_space)
 
char * l2cmsFilterNode_GetText (oyFilterNode_s *node, oyNAME_e type OY_UNUSED, oyAlloc_f allocateFunc)
 implement oyCMMFilterNode_GetText_f() More...
 
char * l2cmsFlagsToText (int flags)
 debugging helper More...
 
cmsHPROFILE l2cmsGamutCheckAbstract (oyProfile_s *proof, cmsUInt32Number flags, int intent, int intent_proof, uint32_t icc_profile_flags)
 convert a proofing profile into a abstract one More...
 
oyPointer l2cmsCMMColorConversion_ToMem_ (cmsHTRANSFORM *xform, oyOptions_s *opts, size_t *size, oyAlloc_f allocateFunc)
 
cmsHPROFILE l2cmsAddProfile (oyProfile_s *p)
 add a profile from Oyranos to the l2cms profile stack More...
 
l2cmsProfileWrap_s * l2cmsAddProofProfile (oyProfile_s *proof, cmsUInt32Number flags, int intent, int intent_proof, uint32_t icc_profile_flags)
 add a abstract proofing profile to the l2cms profile stack More...
 
oyPointer l2cmsFilterNode_CmmIccContextToMem (oyFilterNode_s *node, size_t *size, oyAlloc_f allocateFunc)
 implement oyCMMFilterNode_CreateContext_f() More...
 
int l2cmsModuleData_Convert (oyPointer_s *data_in, oyPointer_s *data_out, oyFilterNode_s *node)
 Convert a ICC device link to LittleCMS 2 color transformThe function might be used to provide a module specific context. Implements oyModuleData_Convert_f. More...
 
int l2cmsFilterPlug_CmmIccRun (oyFilterPlug_s *requestor_plug, oyPixelAccess_s *ticket)
 implement oyCMMFilterPlug_GetNext_f() More...
 
int l2cmsCMMInit (oyStruct_s *filter OY_UNUSED)
 API requirement. More...
 
int l2cmsCMMData_Open (oyStruct_s *data, oyPointer_s *oy)
 oyCMMProfileOpen_t implementation More...
 
cmsHTRANSFORM l2cmsCMMConversionContextCreate_ (oyFilterNode_s *node, cmsHPROFILE *lps, int profiles_n, oyProfiles_s *simulation, int proof_n, int proof, oyPixel_t oy_pixel_layout_in, oyPixel_t oy_pixel_layout_out, oyOptions_s *opts, l2cmsTransformWrap_s **ltw, oyPointer_s *oy)
 create a CMM transform More...
 
int l2cmsGetOptionsUI (oyCMMapiFilter_s *module OY_UNUSED, oyOptions_s *options, int flags, char **ui_text, oyAlloc_f allocateFunc)
 return XFORMS for matching options More...
 
oyImage_slcm2ParseCGATS (const char *cgats)
 Parse a CGATS text. More...
 
int l2cmsMOptions_Handle4 (oyOptions_s *options, const char *command, oyOptions_s **result)
 
const char * l2cmsInfoGetTextProfileC4 (const char *select, oyNAME_e type, oyStruct_s *context OY_UNUSED)
 
oyProfile_slcm2AbstractWhitePoint (double cie_a, double cie_b, uint32_t icc_profile_flags)
 create a White point correction profile More...
 
int l2cmsMOptions_Handle3 (oyOptions_s *options, const char *command, oyOptions_s **result)
 
const char * l2cmsInfoGetTextProfileC3 (const char *select, oyNAME_e type, oyStruct_s *context OY_UNUSED)
 
int l2cmsMOptions_Handle2 (oyOptions_s *options, const char *command, oyOptions_s **result)
 
const char * l2cmsInfoGetTextProfileC2 (const char *select, oyNAME_e type, oyStruct_s *context OY_UNUSED)
 
oyProfile_sl2cmsCreateICCMatrixProfile (float gamma, float rx, float ry, float gx, float gy, float bx, float by, float wx, float wy, int icc_profile_flags)
 create a profile from primaries, white point and one gamma value More...
 
int l2cmsMOptions_Handle (oyOptions_s *options, const char *command, oyOptions_s **result)
 
const char * l2cmsInfoGetTextProfileC (const char *select, oyNAME_e type, oyStruct_s *context OY_UNUSED)
 
const char * l2cmsApi4UiGetText (const char *select, oyNAME_e type, oyStruct_s *context)
 
const char * l2cmsInfoGetText (const char *select, oyNAME_e type, oyStruct_s *context OY_UNUSED)
 

Variables

oyCMMapi4_s_ l2cms_api4_cmm
 lcms2 ICC CMM Context Setup and UI Node More...
 
oyCMMapi10_s_ l2cms_api10_cmm4
 Node for Parsing a CGATS text. More...
 
oyCMMapi10_s_ l2cms_api10_cmm3
 Node for Creating White Point Effect Profiles. More...
 
oyCMMapi10_s_ l2cms_api10_cmm2
 Node for Creating Proofing Effect Profiles. More...
 
oyCMMapi10_s_ l2cms_api10_cmm
 Node for Creating simple Color Matrix Profiles. More...
 
oyCMMapi6_s_ l2cms_api6_cmm
 Node for Converting a Device Link into a lcms2 CMM Context. More...
 
oyCMMapi7_s_ l2cms_api7_cmm
 lcms2 ICC CMM Pixel Processor Engine Node More...
 
oyCMMui_s_ l2cms_api4_ui
 lcms2 ICC CMM Node UI More...
 
oyCMM_s lcm2_cmm_module
 l2cms Module Infos More...
 

Detailed Description

littleCMS CMM module for Oyranos

Oyranos is an open source Color Management System

Copyright:
2007-2017 (C) Kai-Uwe Behrmann
Author
Kai-Uwe Behrmann ku.b@.nosp@m.gmx..nosp@m.de
License:
new BSD http://www.opensource.org/licenses/BSD-3-Clause
Since
2007/11/12

Macro Definition Documentation

#define l2cmsPROOF_LUT_GRID_RASTER   53

The proofing LUTs grid size may improove the sharpness of out of color marking, but at the prise of lost speed and increased memory consumption. 53 is the grid size used internally in l2cms' gamut marking code.

Referenced by l2cmsCMMConversionContextCreate_(), and l2cmsGamutCheckAbstract().

Function Documentation

cmsHPROFILE l2cmsAddProfile ( oyProfile_s p)

add a profile from Oyranos to the l2cms profile stack

Function l2cmsAddProfile Look in the Oyranos cache for a CMM internal representation

Version
Oyranos: 0.1.10
Since
2008/12/28 (Oyranos: 0.1.10)
Date
2008/12/28

References l2cmsCMMData_Open(), l2cmsCMMProfile_GetWrap_(), oy_debug, oyCONNECTOR_EVENT_INCOMPATIBLE_OPTION, oyNAME_NAME, oyNAME_NICK, oyNAME_PATTERN, oyOBJECT_PROFILE_S, oyOBJECT_PROFILES_S, oyValueUInt32(), and oyProfile_s::type_.

Referenced by l2cmsFilterNode_CmmIccContextToMem(), and l2cmsGamutCheckAbstract().

l2cmsProfileWrap_s * l2cmsAddProofProfile ( oyProfile_s proof,
cmsUInt32Number  flags,
int  intent,
int  intent_proof,
uint32_t  icc_profile_flags 
)

add a abstract proofing profile to the l2cms profile stack

Function l2cmsAddProofProfile Look in the Oyranos cache for a CMM internal representation or generate a new abstract profile containing the proofing profiles changes. This can be a proofing color space simulation or out of gamut marking.

Version
Oyranos: 0.9.6
Date
2016/05/02
Since
2009/11/05 (Oyranos: 0.1.10)

References l2cmsCMMProfile_GetWrap_(), l2cmsCMMProfileReleaseWrap(), l2cmsErrorHandlerFunction(), l2cmsGamutCheckAbstract(), lcm2WriteProfileToMem(), oyProfile_s::oy_, oy_debug, oyNAME_NAME, oyNAME_NICK, oyObject_GetName(), oyOBJECT_PROFILE_S, and oyProfile_s::type_.

Referenced by l2cmsCMMConversionContextCreate_(), and l2cmsMOptions_Handle2().

int l2cmsCMMCheckPointer ( oyPointer_s cmm_ptr,
const char *  resource 
)

Function l2cmsCMMCheckPointer

Version
Oyranos: 0.1.8
Date
2007/11/12
Since
2007/11/12 (Oyranos: 0.1.8)

Referenced by l2cmsCMMProfile_GetWrap_(), and l2cmsCMMTransform_GetWrap_().

oyPointer l2cmsCMMColorConversion_ToMem_ ( cmsHTRANSFORM *  xform,
oyOptions_s opts,
size_t *  size,
oyAlloc_f  allocateFunc 
)

Function l2cmsCMMColorConversion_ToMem_

convert a l2cms color conversion context to a device link

Version
Oyranos: 0.1.10
Since
2008/12/28 (Oyranos: 0.1.10)
Date
2008/12/28

References lcm2WriteProfileToMem(), OY_TYPE_STD, oyDOUBLE, oyFilterRegistrationMatch(), oyFLOAT, oyHALF, oyOBJECT_CMM_API4_S, oyOBJECT_CONNECTOR_IMAGING_S, oyUINT16, and oyUINT8.

Referenced by l2cmsFilterNode_CmmIccContextToMem().

cmsHTRANSFORM l2cmsCMMConversionContextCreate_ ( oyFilterNode_s node,
cmsHPROFILE *  lps,
int  profiles_n,
oyProfiles_s simulation,
int  proof_n,
int  proof,
oyPixel_t  oy_pixel_layout_in,
oyPixel_t  oy_pixel_layout_out,
oyOptions_s opts,
l2cmsTransformWrap_s **  ltw,
oyPointer_s oy 
)

create a CMM transform

Function l2cmsCMMConversionContextCreate_

Version
Oyranos: 0.3.3
Since
2008/12/28 (Oyranos: 0.1.10)
Date
2011/11/18

References l2cmsAddProofProfile(), l2cmsFlagsToText(), l2cmsPROOF_LUT_GRID_RASTER, l2cmsTransformWrap_Set_(), oy_debug, oyICCColorSpaceGetName(), oyICCDeviceClassDescription(), and oyPixelToLcm2PixelLayout_().

Referenced by l2cmsFilterNode_CmmIccContextToMem(), and l2cmsModuleData_Convert().

int l2cmsCMMData_Open ( oyStruct_s data,
oyPointer_s oy 
)

oyCMMProfileOpen_t implementation

l2cmsCMMDataOpen()

Version
Oyranos: 0.1.10
Since
2007/11/12 (Oyranos: 0.1.8)
Date
2007/12/27

References l2cmsCMMProfileReleaseWrap(), l2cmsErrorHandlerFunction(), oy_debug, oyOBJECT_PROFILE_S, and oyStruct_s::type_.

Referenced by l2cmsAddProfile().

int l2cmsCMMDeleteTransformWrap ( oyPointer *  wrap)

Function l2cmsCMMDeleteTransformWrap

Version
Oyranos: 0.1.8
Since
2007/12/00 (Oyranos: 0.1.8)
Date
2007/12/00

Referenced by l2cmsTransformWrap_Set_().

int l2cmsCMMInit ( oyStruct_s *filter  OY_UNUSED)

API requirement.

Function l2cmsCMMInit

Version
Oyranos: 0.9.5
Date
2014/02/27
Since
2007/12/11 (Oyranos: 0.1.8)

References l2cmsErrorHandlerFunction().

int l2cmsCMMMessageFuncSet ( oyMessage_f  message_func)

Function l2cmsCMMMessageFuncSet

Version
Oyranos: 0.1.8
Date
2007/11/00
Since
2007/11/00 (Oyranos: 0.1.8)

References lcm2MessageFuncSet(), OY_DOMAIN_INTERNAL, OY_TOP_SHARED, and OY_TYPE_STD.

l2cmsProfileWrap_s * l2cmsCMMProfile_GetWrap_ ( oyPointer_s cmm_ptr)

convert to l2cms profile wrapper struct

Function l2cmsCMMProfile_GetWrap_

Version
Oyranos: 0.1.8
Date
2007/12/10
Since
2007/12/10 (Oyranos: 0.1.8)

References l2cmsCMMCheckPointer(), and oy_debug.

Referenced by l2cmsAddProfile(), and l2cmsAddProofProfile().

int l2cmsCMMProfileReleaseWrap ( oyPointer *  p)

release a l2cms profile wrapper struct

Function l2cmsCMMProfileReleaseWrap

Version
Oyranos: 0.1.8
Date
2007/12/20
Since
2007/12/20 (Oyranos: 0.1.8)

Referenced by l2cmsAddProofProfile(), and l2cmsCMMData_Open().

int l2cmsCMMTransform_GetWrap_ ( oyPointer_s cmm_ptr,
l2cmsTransformWrap_s **  s 
)

convert to l2cms transform wrapper struct

Function l2cmsCMMTransform_GetWrap_

Version
Oyranos: 0.1.8
Since
2007/12/20 (Oyranos: 0.1.8)
Date
2009/05/28

References l2cmsCMMCheckPointer().

Referenced by l2cmsFilterPlug_CmmIccRun().

void l2cmsErrorHandlerFunction ( cmsContext  ContextID,
cmsUInt32Number ErrorCode  OY_UNUSED,
const char *  ErrorText 
)

Function l2cmsErrorHandlerFunction

Version
Oyranos: 0.1.8
Date
2007/11/00
Since
2007/11/00 (Oyranos: 0.1.8)

Referenced by l2cmsAddProofProfile(), l2cmsCMMData_Open(), l2cmsCMMInit(), l2cmsGamutCheckAbstract(), and l2cmsModuleData_Convert().

oyPointer l2cmsFilterNode_CmmIccContextToMem ( oyFilterNode_s node,
size_t *  size,
oyAlloc_f  allocateFunc 
)
char * l2cmsFilterNode_GetText ( oyFilterNode_s node,
oyNAME_e type  OY_UNUSED,
oyAlloc_f  allocateFunc 
)

implement oyCMMFilterNode_GetText_f()

Function l2cmsFilterNode_GetText

Version
Oyranos: 0.1.10
Since
2008/12/27 (Oyranos: 0.1.10)
Date
2009/06/02

References OY_SELECT_COMMON, OY_TYPE_STD, oyBOOLEAN_UNION, oyNAME_NAME, oyNAME_PATTERN, oyOBJECT_PROFILE_S, and oyOPTIONSOURCE_FILTER.

Referenced by l2cmsFilterNode_CmmIccContextToMem(), l2cmsFilterPlug_CmmIccRun(), and l2cmsModuleData_Convert().

int l2cmsFilterPlug_CmmIccRun ( oyFilterPlug_s requestor_plug,
oyPixelAccess_s ticket 
)
char * l2cmsFlagsToText ( int  flags)

debugging helper

Function l2cmsFlagsToText

Version
Oyranos: 0.1.13
Since
2010/11/28 (Oyranos: 0.1.13)
Date
2010/11/28

Referenced by l2cmsCMMConversionContextCreate_(), and l2cmsTransformWrap_Set_().

int l2cmsGetOptionsUI ( oyCMMapiFilter_s *module  OY_UNUSED,
oyOptions_s options,
int  flags,
char **  ui_text,
oyAlloc_f  allocateFunc 
)

return XFORMS for matching options

Function l2cmsGetOptionsUI

Version
Oyranos: 0.9.5
Date
2014/01/08
Since
2009/07/29 (Oyranos: 0.1.10)

References OY_DOMAIN_INTERNAL, OY_TOP_SHARED, and OY_TYPE_STD.

const char* l2cmsInfoGetText ( const char *  select,
oyNAME_e  type,
oyStruct_s *context  OY_UNUSED 
)

This function implements oyCMMinfoGetText_f.

Version
Oyranos: 0.1.10
Since
2008/12/23 (Oyranos: 0.1.10)
Date
2008/12/30

References oyNAME_NAME, oyNAME_NICK, and oyOBJECT_ICON_S.

Referenced by l2cmsApi4UiGetText().

l2cmsTransformWrap_s * l2cmsTransformWrap_Set_ ( cmsHTRANSFORM  xform,
icColorSpaceSignature  color_in,
icColorSpaceSignature  color_out,
oyPixel_t  oy_pixel_layout_in,
oyPixel_t  oy_pixel_layout_out,
oyPointer_s oy 
)

fill a l2cmsTransformWrap_s struct

Function l2cmsTransformWrap_Set_

Version
Oyranos: 0.1.8
Since
2007/12/21 (Oyranos: 0.1.8)
Date
2007/12/21

References l2cmsCMMDeleteTransformWrap(), l2cmsFlagsToText(), and oy_debug.

Referenced by l2cmsCMMConversionContextCreate_().

int oyPixelToLcm2PixelLayout_ ( oyPixel_t  pixel_layout,
icColorSpaceSignature  color_space 
)

Function oyPixelToLcm2PixelLayout_

Version
Oyranos: 0.1.8
Date
2007/11/00
Since
2007/11/00 (Oyranos: 0.1.8)

References oyDOUBLE, oyFLOAT, oyHALF, oyToByteswap_m, oyToChannels_m, oyToColorOffset_m, oyToDataType_m, oyToFlavor_m, oyToPlanar_m, oyToSwapColorChannels_m, oyUINT16, and oyUINT8.

Referenced by l2cmsCMMConversionContextCreate_().

Variable Documentation

oyCMM_s lcm2_cmm_module
Initial value:
= {
0,0,0,
CMM_NICK,
"0.6",
(char**)l2cms_texts,
&l2cms_icon,
}
int l2cmsCMMInit(oyStruct_s *filter OY_UNUSED)
API requirement.
Definition: oyranos_cmm_lcm2.c:388
oyCMMapi4_s_ l2cms_api4_cmm
lcms2 ICC CMM Context Setup and UI Node
Definition: oyranos_cmm_lcm2.c:4176
the basic API interface
Definition: oyCMMapi_s.h:88
const char * l2cmsInfoGetText(const char *select, oyNAME_e type, oyStruct_s *context OY_UNUSED)
Definition: oyranos_cmm_lcm2.c:4212
#define OYRANOS_VERSION
Definition: oyranos_version.h:11
Definition: oyranos_object.h:161

l2cms Module Infos

lcm2_cmm_module

Version
Oyranos: 0.1.10
Since
2007/11/00 (Oyranos: 0.1.8)
Date
2008/12/30