From 2636d3e38618f197f46ea89216b98b05a516256e Mon Sep 17 00:00:00 2001 From: Adam Reichold Date: Sun, 7 Feb 2016 14:04:16 +0100 Subject: [PATCH] Remove some duplication w.r.t. the ICC store from the lab2rgb function. --- rtengine/iplab2rgb.cc | 20 +------------------- 1 file changed, 1 insertion(+), 19 deletions(-) diff --git a/rtengine/iplab2rgb.cc b/rtengine/iplab2rgb.cc index 65f0190a9..89deac08f 100644 --- a/rtengine/iplab2rgb.cc +++ b/rtengine/iplab2rgb.cc @@ -30,15 +30,8 @@ namespace rtengine { -#define CLIP01(a) ((a)>0?((a)<1?(a):1):0) - extern const Settings* settings; -const double (*wprof[])[3] = {xyz_sRGB, xyz_adobe, xyz_prophoto, xyz_widegamut, xyz_bruce, xyz_beta, xyz_best}; -const double (*iwprof[])[3] = {sRGB_xyz, adobe_xyz, prophoto_xyz, widegamut_xyz, bruce_xyz, beta_xyz, best_xyz}; -const char* wprofnames[] = {"sRGB", "Adobe RGB", "ProPhoto", "WideGamut", "BruceRGB", "Beta RGB", "BestRGB"}; -const int numprof = 7; - void ImProcFunctions::lab2monitorRgb (LabImage* lab, Image8* image) { if (monitorTransform) { @@ -209,18 +202,7 @@ Image8* ImProcFunctions::lab2rgb (LabImage* lab, int cx, int cy, int cw, int ch, } } else { - double rgb_xyz[3][3]; - - for (int i = 0; i < numprof; i++) { - if (profile == wprofnames[i]) { - for (int m = 0; m < 3; m++) - for (int n = 0; n < 3; n++) { - rgb_xyz[m][n] = iwprof[i][m][n]; - } - - break; - } - } + const auto rgb_xyz = iccStore->workingSpaceMatrix (profile); #ifdef _OPENMP #pragma omp parallel for schedule(dynamic,16) if (multiThread)