Oyranos  git-devel
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 "oyranos_cmm_lcm2.i18n.c"
#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 (l2cmsTransformWrap_s **wrap)
 
l2cmsProfileWrap_s * l2cmsCMMProfile_GetWrap_ (oyPointer_s *cmm_ptr)
 convert to l2cms profile wrapper struct More...
 
int l2cmsCMMProfileWrap_Release (l2cmsProfileWrap_s **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, 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 l2cmsCMMreset (oyStruct_s *filter OY_UNUSED)
 API requirement. More...
 
int l2cmsCMMProfileWrap_Create (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, int verbose)
 create a CMM transform More...
 
int l2cmsGetOptionsUI (oyCMMapiFilter_s *module OY_UNUSED, oyOptions_s *options OY_UNUSED, int flags OY_UNUSED, char **ui_text, oyAlloc_f allocateFunc)
 return XFORMS for matching options More...
 
oyProfile_slcm2AbstractWhitePointBradford (double *src_iccXYZ, const char *src_name, double *illu_iccXYZ, const char *illu_name, double scale, uint32_t icc_profile_flags, char **file_name)
 create a White point correction profile with Bradford More...
 
int l2cmsMOptions_Handle4 (oyOptions_s *options, const char *command, oyOptions_s **result)
 lcm2AbstractWhitePoint() This function implements oyMOptions_Handle_f. More...
 
const char * l2cmsInfoGetTextProfile4 (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)
 lcm2AbstractWhitePoint() This function implements oyMOptions_Handle_f. More...
 
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)
 l2cmsAddProofProfile() This function implements oyMOptions_Handle_f. More...
 
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)
 l2cmsCreateICCMatrixProfile() This function implements oyMOptions_Handle_f. More...
 
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 Creating White Point Effect Profiles. 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

◆ l2cmsPROOF_LUT_GRID_RASTER

#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.

Function Documentation

◆ l2cmsAddProfile()

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

◆ l2cmsAddProofProfile()

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)

◆ l2cmsCMMCheckPointer()

int l2cmsCMMCheckPointer ( oyPointer_s cmm_ptr,
const char *  resource 
)

Function l2cmsCMMCheckPointer

Version
Oyranos: 0.9.7
Date
2020/02/21
Since
2007/11/12 (Oyranos: 0.1.8)

◆ l2cmsCMMColorConversion_ToMem_()

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

◆ l2cmsCMMConversionContextCreate_()

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,
int  verbose 
)

create a CMM transform

Function l2cmsCMMConversionContextCreate_

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

◆ l2cmsCMMDeleteTransformWrap()

int l2cmsCMMDeleteTransformWrap ( l2cmsTransformWrap_s **  wrap)

Function l2cmsCMMDeleteTransformWrap

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

◆ l2cmsCMMinit()

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)

◆ l2cmsCMMMessageFuncSet()

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)

◆ l2cmsCMMProfile_GetWrap_()

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)

◆ l2cmsCMMProfileWrap_Create()

int l2cmsCMMProfileWrap_Create ( 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

◆ l2cmsCMMProfileWrap_Release()

int l2cmsCMMProfileWrap_Release ( l2cmsProfileWrap_s **  p)

release a l2cms profile wrapper struct

Function l2cmsCMMProfileWrap_Release

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

◆ l2cmsCMMreset()

int l2cmsCMMreset ( oyStruct_s *filter  OY_UNUSED)

API requirement.

Function l2cmsCMMreset

Version
Oyranos: 0.9.7
Date
2019/09/02
Since
2019/09/02 (Oyranos: 0.9.7)

◆ l2cmsCMMTransform_GetWrap_()

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

◆ l2cmsErrorHandlerFunction()

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)

◆ l2cmsFilterNode_CmmIccContextToMem()

oyPointer l2cmsFilterNode_CmmIccContextToMem ( oyFilterNode_s node,
size_t *  size,
oyAlloc_f  allocateFunc 
)

implement oyCMMFilterNode_CreateContext_f()

l2cmsFilterNode_CmmIccContextToMem()

Version
Oyranos: 0.1.8
Since
2008/11/01 (Oyranos: 0.1.8)
Date
2008/11/01

◆ l2cmsFilterNode_GetText()

char * l2cmsFilterNode_GetText ( oyFilterNode_s node,
oyNAME_e  type,
oyAlloc_f  allocateFunc 
)

implement oyCMMFilterNode_GetText_f()

Function l2cmsFilterNode_GetText provides a description in JSON format

param type oyNAME_NAME

  • oyNAME_NICK suitable for api4 hash ID;
  • oyNAME_DESCRIPTION more details for api7 hash ID
Version
Oyranos: 0.9.7
Date
2020/03/21
Since
2008/12/27 (Oyranos: 0.1.10)

References oyjlStringCopy().

◆ l2cmsFilterPlug_CmmIccRun()

int l2cmsFilterPlug_CmmIccRun ( oyFilterPlug_s requestor_plug,
oyPixelAccess_s ticket 
)

implement oyCMMFilterPlug_GetNext_f()

Function l2cmsFilterPlug_CmmIccRun

Version
Oyranos: 0.1.10
Since
2008/07/18 (Oyranos: 0.1.8)
Date
2011/06/17

References oyUINT8.

◆ l2cmsFlagsToText()

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

◆ l2cmsGetOptionsUI()

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

return XFORMS for matching options

Function l2cmsGetOptionsUI Static options.

Version
Oyranos: 0.9.7
Date
2018/06/14
Since
2009/07/29 (Oyranos: 0.1.10)

◆ l2cmsInfoGetText()

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

Referenced by l2cmsApi4UiGetText().

◆ l2cmsTransformWrap_Set_()

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

◆ oyPixelToLcm2PixelLayout_()

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 oyToChannels_m, oyToColorOffset_m, oyToDataType_m, oyToFlavor_m, and oyToPlanar_m.

Variable Documentation

◆ lcm2_cmm_module

oyCMM_s lcm2_cmm_module
Initial value:
= {
0,0,0,
"0.6",
(char**)l2cms_texts,
OYRANOS_VERSION,
&l2cms_icon,
}
int l2cmsCMMinit(oyStruct_s *filter OY_UNUSED)
API requirement.
Definition: oyranos_cmm_lcm2.c:607
oyCMMapi4_s_ l2cms_api4_cmm
lcms2 ICC CMM Context Setup and UI Node
Definition: oyranos_cmm_lcm2.c:4861
the basic API interface
Definition: oyCMMapi_s.h:97
int l2cmsCMMreset(oyStruct_s *filter OY_UNUSED)
API requirement.
Definition: oyranos_cmm_lcm2.c:661
const char * l2cmsInfoGetText(const char *select, oyNAME_e type, oyStruct_s *context OY_UNUSED)
Definition: oyranos_cmm_lcm2.c:4898
#define CMM_NICK
monitor device detection
Definition: oyranos_monitor_internal_x11.h:29
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