diff options
Diffstat (limited to 'source/blender/blenkernel/intern/colortools.c')
-rw-r--r-- | source/blender/blenkernel/intern/colortools.c | 58 |
1 files changed, 0 insertions, 58 deletions
diff --git a/source/blender/blenkernel/intern/colortools.c b/source/blender/blenkernel/intern/colortools.c index 1d7481b365a..9a6c2cc7e31 100644 --- a/source/blender/blenkernel/intern/colortools.c +++ b/source/blender/blenkernel/intern/colortools.c @@ -37,10 +37,6 @@ #include <stdlib.h> #include <float.h> -#ifdef WITH_LCMS -#include <lcms.h> -#endif - #include "MEM_guardedalloc.h" #include "DNA_color_types.h" @@ -789,60 +785,6 @@ void curvemapping_evaluate_premulRGBF(CurveMapping *cumap, float *vecout, const } -#ifdef WITH_LCMS -/* basic error handler, if we dont do this blender will exit */ -static int ErrorReportingFunction(int ErrorCode, const char *ErrorText) -{ - fprintf(stderr, "%s:%d\n", ErrorText, ErrorCode); - return 1; -} -#endif - -void colorcorrection_do_ibuf(ImBuf *ibuf, const char *profile) -{ -#ifdef WITH_LCMS - if (ibuf->crect == NULL) - { - cmsHPROFILE proofingProfile; - - /* TODO, move to initialization area of code */ - //cmsSetLogErrorHandler(ErrorReportingFunction); - cmsSetErrorHandler(ErrorReportingFunction); - - /* will return NULL if the file isn't fount */ - proofingProfile = cmsOpenProfileFromFile(profile, "r"); - - cmsErrorAction(LCMS_ERROR_SHOW); - - if(proofingProfile) { - cmsHPROFILE imageProfile; - cmsHTRANSFORM hTransform; - - ibuf->crect = MEM_mallocN(ibuf->x*ibuf->y*sizeof(int), "imbuf crect"); - - imageProfile = cmsCreate_sRGBProfile(); - - - hTransform = cmsCreateProofingTransform(imageProfile, TYPE_RGBA_8, imageProfile, TYPE_RGBA_8, - proofingProfile, - INTENT_ABSOLUTE_COLORIMETRIC, - INTENT_ABSOLUTE_COLORIMETRIC, - cmsFLAGS_SOFTPROOFING); - - cmsDoTransform(hTransform, ibuf->rect, ibuf->crect, ibuf->x * ibuf->y); - - cmsDeleteTransform(hTransform); - cmsCloseProfile(imageProfile); - cmsCloseProfile(proofingProfile); - } - } -#else - /* unused */ - (void)ibuf; - (void)profile; -#endif -} - /* only used for image editor curves */ void curvemapping_do_ibuf(CurveMapping *cumap, ImBuf *ibuf) { |