diff --git a/rtdata/iccprofiles/output/RT_Gray-V2-labl.icc b/rtdata/iccprofiles/output/RT_Gray-V2-labl.icc deleted file mode 100644 index 76b57f7c3..000000000 Binary files a/rtdata/iccprofiles/output/RT_Gray-V2-labl.icc and /dev/null differ diff --git a/rtengine/dcrop.cc b/rtengine/dcrop.cc index 21fa919a9..3477646c2 100644 --- a/rtengine/dcrop.cc +++ b/rtengine/dcrop.cc @@ -809,10 +809,10 @@ void Crop::update(int todo) if (todo & M_INIT) { if (params.icm.wtrcin == "free") { //exec TRC IN free - Glib::ustring profi; - profi = params.icm.working; + Glib::ustring profile; + profile = params.icm.working; - if (profi == "sRGB" || profi == "Adobe RGB" || profi == "ProPhoto" || profi == "WideGamut" || profi == "BruceRGB" || profi == "Beta RGB" || profi == "BestRGB" || profi == "Rec2020" || profi == "ACESp0" || profi == "ACESp1") { + if (profile == "sRGB" || profile == "Adobe RGB" || profile == "ProPhoto" || profile == "WideGamut" || profile == "BruceRGB" || profile == "Beta RGB" || profile == "BestRGB" || profile == "Rec2020" || profile == "ACESp0" || profile == "ACESp1") { //first put gamma TRC to 1 int cw = baseCrop->getWidth(); diff --git a/rtengine/iccstore.cc b/rtengine/iccstore.cc index d5c1a7723..1aba413c1 100644 --- a/rtengine/iccstore.cc +++ b/rtengine/iccstore.cc @@ -1323,14 +1323,14 @@ cmsHPROFILE rtengine::ICCStore::createGammaProfile(const procparams::ColorManage ColorTemp temp = ColorTemp::D50; //primaries for 10 working profiles ==> output profiles - if (icm.wprimari == "wideg") { + if (icm.wprimaries == "Widegamut") { p[0] = 0.7350; //Widegamut primaries p[1] = 0.2650; p[2] = 0.1150; p[3] = 0.8260; p[4] = 0.1570; p[5] = 0.0180; - } else if (icm.wprimari == "adob") { + } else if (icm.wprimaries == "Adobe") { p[0] = 0.6400; //Adobe primaries p[1] = 0.3300; p[2] = 0.2100; @@ -1338,7 +1338,7 @@ cmsHPROFILE rtengine::ICCStore::createGammaProfile(const procparams::ColorManage p[4] = 0.1500; p[5] = 0.0600; temp = ColorTemp::D65; - } else if (icm.wprimari == "srgb") { + } else if (icm.wprimaries == "sRGB") { p[0] = 0.6400; // sRGB primaries p[1] = 0.3300; p[2] = 0.3000; @@ -1346,7 +1346,7 @@ cmsHPROFILE rtengine::ICCStore::createGammaProfile(const procparams::ColorManage p[4] = 0.1500; p[5] = 0.0600; temp = ColorTemp::D65; - } else if (icm.wprimari == "BruceRGB") { + } else if (icm.wprimaries == "BruceRGB") { p[0] = 0.6400; // Bruce primaries p[1] = 0.3300; p[2] = 0.2800; @@ -1354,21 +1354,21 @@ cmsHPROFILE rtengine::ICCStore::createGammaProfile(const procparams::ColorManage p[4] = 0.1500; p[5] = 0.0600; temp = ColorTemp::D65; - } else if (icm.wprimari == "BetaRGB") { + } else if (icm.wprimaries == "BetaRGB") { p[0] = 0.6888; // Beta primaries p[1] = 0.3112; p[2] = 0.1986; p[3] = 0.7551; p[4] = 0.1265; p[5] = 0.0352; - } else if (icm.wprimari == "BestRGB") { + } else if (icm.wprimaries == "BestRGB") { p[0] = 0.7347; // Best primaries p[1] = 0.2653; p[2] = 0.2150; p[3] = 0.7750; p[4] = 0.1300; p[5] = 0.0350; - } else if (icm.wprimari == "rec2020") { + } else if (icm.wprimaries == "Rec2020") { p[0] = 0.7080; // Rec2020 primaries p[1] = 0.2920; p[2] = 0.1700; @@ -1376,7 +1376,7 @@ cmsHPROFILE rtengine::ICCStore::createGammaProfile(const procparams::ColorManage p[4] = 0.1310; p[5] = 0.0460; temp = ColorTemp::D65; - } else if (icm.wprimari == "acesp0") { + } else if (icm.wprimaries == "Acesp0") { p[0] = 0.7347; // ACES P0 primaries p[1] = 0.2653; p[2] = 0.0000; @@ -1384,7 +1384,7 @@ cmsHPROFILE rtengine::ICCStore::createGammaProfile(const procparams::ColorManage p[4] = 0.0001; p[5] = -0.0770; temp = ColorTemp::D60; - } else if (icm.wprimari == "acesp1") { + } else if (icm.wprimaries == "Acesp1") { p[0] = 0.713; // ACES P1 primaries p[1] = 0.293; p[2] = 0.165; @@ -1392,14 +1392,14 @@ cmsHPROFILE rtengine::ICCStore::createGammaProfile(const procparams::ColorManage p[4] = 0.128; p[5] = 0.044; temp = ColorTemp::D60; - } else if (icm.wprimari == "proph") { + } else if (icm.wprimaries == "Prophoto") { p[0] = 0.7347; //ProPhoto and default primaries p[1] = 0.2653; p[2] = 0.1596; p[3] = 0.8404; p[4] = 0.0366; p[5] = 0.0001; - } else if (icm.wprimari == "pfree") { + } else if (icm.wprimaries == "pfree") { p[0] = icm.predx; p[1] = icm.predy; p[2] = icm.pgrex; @@ -1453,7 +1453,7 @@ cmsHPROFILE rtengine::ICCStore::createGammaProfile(const procparams::ColorManage tempv4 = 6504.; } else if (icm.wtemp == "D80") { tempv4 = 8000.; - } else if (icm.wtemp == "INC") { + } else if (icm.wtemp == "stdA") { tempv4 = 5003.; } @@ -1465,7 +1465,7 @@ cmsHPROFILE rtengine::ICCStore::createGammaProfile(const procparams::ColorManage cmsWhitePointFromTemp(&xyD, (double)temp); } - if (icm.wtemp == "INC") xyD = {0.447573, 0.407440, 1.0}; + if (icm.wtemp == "stdA") xyD = {0.447573, 0.407440, 1.0}; // cmsWhitePointFromTemp(&xyD, (double)temp); @@ -1497,44 +1497,44 @@ cmsHPROFILE rtengine::ICCStore::createCustomGammaOutputProfile(const procparams: } //necessary for V2 profile - if (icm.wprimari == "proph" && rtengine::ICCStore::getInstance()->outputProfileExist(options.rtSettings.prophoto) && !pro) { + if (icm.wprimaries == "Prophoto" && rtengine::ICCStore::getInstance()->outputProfileExist(options.rtSettings.prophoto) && !pro) { outProfile = options.rtSettings.prophoto; - outPr = "RT_large"; + outPr = "RT_Large"; - } else if (icm.wprimari == "adob" && rtengine::ICCStore::getInstance()->outputProfileExist(options.rtSettings.adobe)) { + } else if (icm.wprimaries == "Adobe" && rtengine::ICCStore::getInstance()->outputProfileExist(options.rtSettings.adobe)) { outProfile = options.rtSettings.adobe; - outPr = "RT_adob"; - } else if (icm.wprimari == "wideg" && rtengine::ICCStore::getInstance()->outputProfileExist(options.rtSettings.widegamut)) { + outPr = "RT_Adob"; + } else if (icm.wprimaries == "Widegamut" && rtengine::ICCStore::getInstance()->outputProfileExist(options.rtSettings.widegamut)) { outProfile = options.rtSettings.widegamut; - outPr = "RT_wide"; - } else if (icm.wprimari == "BetaRGB" && rtengine::ICCStore::getInstance()->outputProfileExist(options.rtSettings.beta)) { + outPr = "RT_Wide"; + } else if (icm.wprimaries == "BetaRGB" && rtengine::ICCStore::getInstance()->outputProfileExist(options.rtSettings.beta)) { outProfile = options.rtSettings.beta; - outPr = "RT_beta"; - } else if (icm.wprimari == "BestRGB" && rtengine::ICCStore::getInstance()->outputProfileExist(options.rtSettings.best)) { + outPr = "RT_Beta"; + } else if (icm.wprimaries == "BestRGB" && rtengine::ICCStore::getInstance()->outputProfileExist(options.rtSettings.best)) { outProfile = options.rtSettings.best; - outPr = "RT_best"; - } else if (icm.wprimari == "BruceRGB" && rtengine::ICCStore::getInstance()->outputProfileExist(options.rtSettings.bruce)) { + outPr = "RT_Best"; + } else if (icm.wprimaries == "BruceRGB" && rtengine::ICCStore::getInstance()->outputProfileExist(options.rtSettings.bruce)) { outProfile = options.rtSettings.bruce; - outPr = "RT_bruce"; - } else if (icm.wprimari == "srgb" && rtengine::ICCStore::getInstance()->outputProfileExist(options.rtSettings.srgb) && !pro) { + outPr = "RT_Bruce"; + } else if (icm.wprimaries == "sRGB" && rtengine::ICCStore::getInstance()->outputProfileExist(options.rtSettings.srgb) && !pro) { outProfile = options.rtSettings.srgb; - outPr = "RT_srgb"; - } else if (icm.wprimari == "sRGB" && rtengine::ICCStore::getInstance()->outputProfileExist(options.rtSettings.srgb10) && pro) { + outPr = "RT_sRGB"; + } else if (icm.wprimaries == "sRGB" && rtengine::ICCStore::getInstance()->outputProfileExist(options.rtSettings.srgb10) && pro) { outProfile = options.rtSettings.srgb10; - outPr = "RT_srgb"; - } else if (icm.wprimari == "proph" && rtengine::ICCStore::getInstance()->outputProfileExist(options.rtSettings.prophoto10) && pro) { + outPr = "RT_sRGB"; + } else if (icm.wprimaries == "Prophoto" && rtengine::ICCStore::getInstance()->outputProfileExist(options.rtSettings.prophoto10) && pro) { outProfile = options.rtSettings.prophoto10; - outPr = "RT_large"; - } else if (icm.wprimari == "rec2020" && rtengine::ICCStore::getInstance()->outputProfileExist(options.rtSettings.rec2020)) { + outPr = "RT_Large"; + } else if (icm.wprimaries == "Rec2020" && rtengine::ICCStore::getInstance()->outputProfileExist(options.rtSettings.rec2020)) { outProfile = options.rtSettings.rec2020; - outPr = "RT_rec2020"; - } else if (icm.wprimari == "acesp0" && rtengine::ICCStore::getInstance()->outputProfileExist(options.rtSettings.ACESp0)) { + outPr = "RT_Rec2020"; + } else if (icm.wprimaries == "Acesp0" && rtengine::ICCStore::getInstance()->outputProfileExist(options.rtSettings.ACESp0)) { outProfile = options.rtSettings.ACESp0; - outPr = "RT_acesp0"; - } else if (icm.wprimari == "acesp1" && rtengine::ICCStore::getInstance()->outputProfileExist(options.rtSettings.ACESp1)) { + outPr = "RT_Acesp0"; + } else if (icm.wprimaries == "Acesp1" && rtengine::ICCStore::getInstance()->outputProfileExist(options.rtSettings.ACESp1)) { outProfile = options.rtSettings.ACESp1; - outPr = "RT_acesp1"; - } else if (icm.wprimari == "pfree") { + outPr = "RT_Acesp1"; + } else if (icm.wprimaries == "pfree") { outProfile = options.rtSettings.srgb; printf("PFRRE\n"); outPr = "RT_pfree"; @@ -1609,8 +1609,8 @@ cmsHPROFILE rtengine::ICCStore::createCustomGammaOutputProfile(const procparams: outPr = outPr + "D65"; } else if (icm.wtemp == "D80") { outPr = outPr + "D80"; - } else if (icm.wtemp == "INC") { - outPr = outPr + "INC"; + } else if (icm.wtemp == "stdA") { + outPr = outPr + "stdA"; } // printf("outpr=%s \n",outPr.c_str()); @@ -1625,9 +1625,9 @@ cmsHPROFILE rtengine::ICCStore::createCustomGammaOutputProfile(const procparams: if (icm.gamma == "Free") { if (icm.wprofile == "v4") { - outPro = outPr + "_V4_" + std::to_string((float)icm.gampos) + " " + std::to_string((float)icm.slpos) + ".icc"; + outPro = outPr + "_v4_" + std::to_string((float)icm.gampos) + " " + std::to_string((float)icm.slpos) + ".icc"; } else if (icm.wprofile == "v2" || icm.wprofile == "none") { - outPro = outPr + "_V2_" + std::to_string((float)icm.gampos) + " " + std::to_string((float)icm.slpos) + ".icc"; + outPro = outPr + "_v2_" + std::to_string((float)icm.gampos) + " " + std::to_string((float)icm.slpos) + ".icc"; } gammaWs.precision(2); @@ -1639,10 +1639,10 @@ cmsHPROFILE rtengine::ICCStore::createCustomGammaOutputProfile(const procparams: } else { if (icm.wprofile == "v4") { - outPro = outPr + "_V4_" + gammaStr + ".icc"; + outPro = outPr + "_v4_" + gammaStr + ".icc"; } else if (icm.wprofile == "v2" || icm.wprofile == "none") { - outPro = outPr + "_V2_" + gammaStr + ".icc"; + outPro = outPr + "_v2_" + gammaStr + ".icc"; } gammaWs << outTemp << gammaStr; @@ -1693,7 +1693,7 @@ cmsHPROFILE rtengine::ICCStore::createCustomGammaOutputProfile(const procparams: }; ColorTemp temp = ColorTemp::D50; - if (icm.wprimari == "wideg") { + if (icm.wprimaries == "Widegamut") { p[0] = 0.7350; //Widegamut primaries p[1] = 0.2650; p[2] = 0.1150; @@ -1701,7 +1701,7 @@ cmsHPROFILE rtengine::ICCStore::createCustomGammaOutputProfile(const procparams: p[4] = 0.1570; p[5] = 0.0180; - } else if (icm.wprimari == "adob") { + } else if (icm.wprimaries == "Adobe") { p[0] = 0.6400; //Adobe primaries p[1] = 0.3300; p[2] = 0.2100; @@ -1709,7 +1709,7 @@ cmsHPROFILE rtengine::ICCStore::createCustomGammaOutputProfile(const procparams: p[4] = 0.1500; p[5] = 0.0600; temp = ColorTemp::D65; - } else if (icm.wprimari == "srgb") { + } else if (icm.wprimaries == "sRGB") { p[0] = 0.6400; // sRGB primaries p[1] = 0.3300; p[2] = 0.3000; @@ -1717,7 +1717,7 @@ cmsHPROFILE rtengine::ICCStore::createCustomGammaOutputProfile(const procparams: p[4] = 0.1500; p[5] = 0.0600; temp = ColorTemp::D65; - } else if (icm.wprimari == "BruceRGB") { + } else if (icm.wprimaries == "BruceRGB") { p[0] = 0.6400; // Bruce primaries p[1] = 0.3300; p[2] = 0.2800; @@ -1725,21 +1725,21 @@ cmsHPROFILE rtengine::ICCStore::createCustomGammaOutputProfile(const procparams: p[4] = 0.1500; p[5] = 0.0600; temp = ColorTemp::D65; - } else if (icm.wprimari == "BetaRGB") { + } else if (icm.wprimaries == "BetaRGB") { p[0] = 0.6888; // Beta primaries p[1] = 0.3112; p[2] = 0.1986; p[3] = 0.7551; p[4] = 0.1265; p[5] = 0.0352; - } else if (icm.wprimari == "BestRGB") { + } else if (icm.wprimaries == "BestRGB") { p[0] = 0.7347; // Best primaries p[1] = 0.2653; p[2] = 0.2150; p[3] = 0.7750; p[4] = 0.1300; p[5] = 0.0350; - } else if (icm.wprimari == "rec2020") { + } else if (icm.wprimaries == "Rec2020") { p[0] = 0.7080; // Rec2020 primaries p[1] = 0.2920; p[2] = 0.1700; @@ -1747,7 +1747,7 @@ cmsHPROFILE rtengine::ICCStore::createCustomGammaOutputProfile(const procparams: p[4] = 0.1310; p[5] = 0.0460; temp = ColorTemp::D65; - } else if (icm.wprimari == "acesp0") { + } else if (icm.wprimaries == "Acesp0") { p[0] = 0.7347; // ACES P0 primaries p[1] = 0.2653; p[2] = 0.0000; @@ -1755,7 +1755,7 @@ cmsHPROFILE rtengine::ICCStore::createCustomGammaOutputProfile(const procparams: p[4] = 0.0001; p[5] = -0.0770; temp = ColorTemp::D60; - } else if (icm.wprimari == "acesp1") { + } else if (icm.wprimaries == "Acesp1") { p[0] = 0.713; // ACES P1 primaries p[1] = 0.293; p[2] = 0.165; @@ -1763,14 +1763,14 @@ cmsHPROFILE rtengine::ICCStore::createCustomGammaOutputProfile(const procparams: p[4] = 0.128; p[5] = 0.044; temp = ColorTemp::D60; - } else if (icm.wprimari == "proph") { + } else if (icm.wprimaries == "Prophoto") { p[0] = 0.7347; //ProPhoto and default primaries p[1] = 0.2653; p[2] = 0.1596; p[3] = 0.8404; p[4] = 0.0366; p[5] = 0.0001; - } else if (icm.wprimari == "pfree") { + } else if (icm.wprimaries == "pfree") { p[0] = icm.predx; p[1] = icm.predy; p[2] = icm.pgrex; @@ -1808,7 +1808,7 @@ cmsHPROFILE rtengine::ICCStore::createCustomGammaOutputProfile(const procparams: tempv4 = 6504.; } else if (icm.wtemp == "D80") { tempv4 = 8000.; - } else if (icm.wtemp == "INC") { + } else if (icm.wtemp == "stdA") { tempv4 = 5003.; } @@ -1822,7 +1822,7 @@ cmsHPROFILE rtengine::ICCStore::createCustomGammaOutputProfile(const procparams: cmsWhitePointFromTemp(&xyD, (double)temp); } - if (icm.wtemp == "INC") xyD = {0.447573, 0.407440, 1.0}; + if (icm.wtemp == "stdA") xyD = {0.447573, 0.407440, 1.0}; cmsToneCurve* GammaTRC[3]; diff --git a/rtengine/improccoordinator.cc b/rtengine/improccoordinator.cc index f63aff9bd..ad3f06de4 100644 --- a/rtengine/improccoordinator.cc +++ b/rtengine/improccoordinator.cc @@ -487,10 +487,10 @@ void ImProcCoordinator::updatePreviewImage(int todo, Crop* cropCall) if (todo & M_INIT) { if (params.icm.wtrcin == "free") { //exec TRC IN free - Glib::ustring profi; - profi = params.icm.working; + Glib::ustring profile; + profile = params.icm.working; - if (profi == "sRGB" || profi == "Adobe RGB" || profi == "ProPhoto" || profi == "WideGamut" || profi == "BruceRGB" || profi == "Beta RGB" || profi == "BestRGB" || profi == "Rec2020" || profi == "ACESp0" || profi == "ACESp1") { + if (profile == "sRGB" || profile == "Adobe RGB" || profile == "ProPhoto" || profile == "WideGamut" || profile == "BruceRGB" || profile == "Beta RGB" || profile == "BestRGB" || profile == "Rec2020" || profile == "ACESp0" || profile == "ACESp1") { int cw = oprevi->getWidth(); int ch = oprevi->getHeight(); // put gamma TRC to 1 diff --git a/rtengine/improcfun.h b/rtengine/improcfun.h index 56dddf0ad..b650c3aa7 100644 --- a/rtengine/improcfun.h +++ b/rtengine/improcfun.h @@ -352,7 +352,7 @@ public: Image8* lab2rgb(LabImage* lab, int cx, int cy, int cw, int ch, const procparams::ColorManagementParams &icm, bool consider_histogram_settings = true); Imagefloat* lab2rgbOut(LabImage* lab, int cx, int cy, int cw, int ch, const procparams::ColorManagementParams &icm, GammaValues *ga = nullptr); // CieImage *ciec; - Imagefloat* workingtrc(Imagefloat* working, int cw, int ch, int mul, Glib::ustring profi, double gampos, double slpos, double &ga0, double &ga1, double &ga2, double &ga3, double &ga4, double &ga5, double &ga6); + Imagefloat* workingtrc(Imagefloat* working, int cw, int ch, int mul, Glib::ustring profile, double gampos, double slpos, double &ga0, double &ga1, double &ga2, double &ga3, double &ga4, double &ga5, double &ga6); bool transCoord(int W, int H, int x, int y, int w, int h, int& xv, int& yv, int& wv, int& hv, double ascaleDef = -1, const LensCorrection *pLCPMap = nullptr); bool transCoord(int W, int H, const std::vector &src, std::vector &red, std::vector &green, std::vector &blue, double ascaleDef = -1, const LensCorrection *pLCPMap = nullptr); diff --git a/rtengine/iplab2rgb.cc b/rtengine/iplab2rgb.cc index d93f47679..86af5e4ab 100644 --- a/rtengine/iplab2rgb.cc +++ b/rtengine/iplab2rgb.cc @@ -368,7 +368,7 @@ Imagefloat* ImProcFunctions::lab2rgbOut(LabImage* lab, int cx, int cy, int cw, i } -Imagefloat* ImProcFunctions::workingtrc(Imagefloat* working, int cw, int ch, int mul, Glib::ustring profi, double gampos, double slpos, double &ga0, double &ga1, double &ga2, double &ga3, double &ga4, double &ga5, double &ga6) +Imagefloat* ImProcFunctions::workingtrc(Imagefloat* working, int cw, int ch, int mul, Glib::ustring profile, double gampos, double slpos, double &ga0, double &ga1, double &ga2, double &ga3, double &ga4, double &ga5, double &ga6) { TMatrix wprof; @@ -428,14 +428,14 @@ Imagefloat* ImProcFunctions::workingtrc(Imagefloat* working, int cw, int ch, int if (true) { //primaries for 10 working profiles ==> output profiles - if (profi == "WideGamut") { + if (profile == "WideGamut") { p[0] = 0.7350; //Widegamut primaries p[1] = 0.2650; p[2] = 0.1150; p[3] = 0.8260; p[4] = 0.1570; p[5] = 0.0180; - } else if (profi == "Adobe RGB") { + } else if (profile == "Adobe RGB") { p[0] = 0.6400; //Adobe primaries p[1] = 0.3300; p[2] = 0.2100; @@ -443,7 +443,7 @@ Imagefloat* ImProcFunctions::workingtrc(Imagefloat* working, int cw, int ch, int p[4] = 0.1500; p[5] = 0.0600; temp = ColorTemp::D65; - } else if (profi == "sRGB") { + } else if (profile == "sRGB") { p[0] = 0.6400; // sRGB primaries p[1] = 0.3300; p[2] = 0.3000; @@ -451,7 +451,7 @@ Imagefloat* ImProcFunctions::workingtrc(Imagefloat* working, int cw, int ch, int p[4] = 0.1500; p[5] = 0.0600; temp = ColorTemp::D65; - } else if (profi == "BruceRGB") { + } else if (profile == "BruceRGB") { p[0] = 0.6400; // Bruce primaries p[1] = 0.3300; p[2] = 0.2800; @@ -459,21 +459,21 @@ Imagefloat* ImProcFunctions::workingtrc(Imagefloat* working, int cw, int ch, int p[4] = 0.1500; p[5] = 0.0600; temp = ColorTemp::D65; - } else if (profi == "Beta RGB") { + } else if (profile == "Beta RGB") { p[0] = 0.6888; // Beta primaries p[1] = 0.3112; p[2] = 0.1986; p[3] = 0.7551; p[4] = 0.1265; p[5] = 0.0352; - } else if (profi == "BestRGB") { + } else if (profile == "BestRGB") { p[0] = 0.7347; // Best primaries p[1] = 0.2653; p[2] = 0.2150; p[3] = 0.7750; p[4] = 0.1300; p[5] = 0.0350; - } else if (profi == "Rec2020") { + } else if (profile == "Rec2020") { p[0] = 0.7080; // Rec2020 primaries p[1] = 0.2920; p[2] = 0.1700; @@ -481,7 +481,7 @@ Imagefloat* ImProcFunctions::workingtrc(Imagefloat* working, int cw, int ch, int p[4] = 0.1310; p[5] = 0.0460; temp = ColorTemp::D65; - } else if (profi == "ACESp0") { + } else if (profile == "ACESp0") { p[0] = 0.7347; // ACES P0 primaries p[1] = 0.2653; p[2] = 0.0000; @@ -489,7 +489,7 @@ Imagefloat* ImProcFunctions::workingtrc(Imagefloat* working, int cw, int ch, int p[4] = 0.0001; p[5] = -0.0770; temp = ColorTemp::D60; - } else if (profi == "ACESp1") { + } else if (profile == "ACESp1") { p[0] = 0.713; // ACES P1 primaries p[1] = 0.293; p[2] = 0.165; @@ -497,7 +497,7 @@ Imagefloat* ImProcFunctions::workingtrc(Imagefloat* working, int cw, int ch, int p[4] = 0.128; p[5] = 0.044; temp = ColorTemp::D60; - } else if (profi == "ProPhoto") { + } else if (profile == "ProPhoto") { p[0] = 0.7347; //ProPhoto and default primaries p[1] = 0.2653; p[2] = 0.1596; diff --git a/rtengine/procparams.cc b/rtengine/procparams.cc index e9bc2d88b..7371f928a 100644 --- a/rtengine/procparams.cc +++ b/rtengine/procparams.cc @@ -1966,7 +1966,7 @@ ColorManagementParams::ColorManagementParams() : gamm(2.4), slop(12.92), - wprimari("sRGB"), + wprimaries("sRGB"), wprofile("none"), wtemp("DEF"), freegamma(false), @@ -1999,7 +1999,7 @@ bool ColorManagementParams::operator ==(const ColorManagementParams& other) cons && pbluy == other.pbluy && gamm == other.gamm && slop == other.slop - && wprimari == other.wprimari + && wprimaries == other.wprimaries && wprofile == other.wprofile && wtemp == other.wtemp && wtrcin == other.wtrcin @@ -3176,7 +3176,7 @@ int ProcParams::save(const Glib::ustring& fname, const Glib::ustring& fname2, bo saveToKeyfile(!pedited || pedited->icm.gamm, "Color Management", "GammaValueIn", icm.gamm, keyFile); saveToKeyfile(!pedited || pedited->icm.slop, "Color Management", "GammaSlopeIn", icm.slop, keyFile); - saveToKeyfile(!pedited || pedited->icm.wprimari, "Color Management", "GammaPrimari", icm.wprimari, keyFile); + saveToKeyfile(!pedited || pedited->icm.wprimaries, "Color Management", "GammaPrimaries", icm.wprimaries, keyFile); saveToKeyfile(!pedited || pedited->icm.wtemp, "Color Management", "GammaTemp", icm.wtemp, keyFile); saveToKeyfile(!pedited || pedited->icm.wprofile, "Color Management", "GammaProfile", icm.wprofile, keyFile); saveToKeyfile(!pedited || pedited->icm.wtrcin, "Color Management", "GammaTRCIN", icm.wtrcin, keyFile); @@ -4211,7 +4211,7 @@ int ProcParams::load(const Glib::ustring& fname, ParamsEdited* pedited) assignFromKeyfile(keyFile, "Color Management", "GammaValueIn", pedited, icm.gamm, pedited->icm.gamm); assignFromKeyfile(keyFile, "Color Management", "GammaSlopeIn", pedited, icm.slop, pedited->icm.slop); - assignFromKeyfile(keyFile, "Color Management", "GammaPrimari", pedited, icm.wprimari, pedited->icm.wprimari); + assignFromKeyfile(keyFile, "Color Management", "GammaPrimaries", pedited, icm.wprimaries, pedited->icm.wprimaries); assignFromKeyfile(keyFile, "Color Management", "GammaProfile", pedited, icm.wprofile, pedited->icm.wprofile); assignFromKeyfile(keyFile, "Color Management", "GammaTemp", pedited, icm.wtemp, pedited->icm.wtemp); assignFromKeyfile(keyFile, "Color Management", "GammaTRCIN", pedited, icm.wtrcin, pedited->icm.wtrcin); diff --git a/rtengine/procparams.h b/rtengine/procparams.h index b2c86f149..67e1d92ed 100644 --- a/rtengine/procparams.h +++ b/rtengine/procparams.h @@ -1029,7 +1029,7 @@ struct ColorManagementParams { double gamm; double slop; - Glib::ustring wprimari; + Glib::ustring wprimaries; Glib::ustring wprofile; Glib::ustring wtemp; static const Glib::ustring NoICMString; diff --git a/rtengine/simpleprocess.cc b/rtengine/simpleprocess.cc index 1c48734e0..8ec13ad32 100644 --- a/rtengine/simpleprocess.cc +++ b/rtengine/simpleprocess.cc @@ -885,10 +885,10 @@ private: //gamma TRC working { if (params.icm.wtrcin == "free") { //exec TRC IN free - Glib::ustring profi; - profi = params.icm.working; + Glib::ustring profile; + profile = params.icm.working; - if (profi == "sRGB" || profi == "Adobe RGB" || profi == "ProPhoto" || profi == "WideGamut" || profi == "BruceRGB" || profi == "Beta RGB" || profi == "BestRGB" || profi == "Rec2020" || profi == "ACESp0" || profi == "ACESp1") { + if (profile == "sRGB" || profile == "Adobe RGB" || profile == "ProPhoto" || profile == "WideGamut" || profile == "BruceRGB" || profile == "Beta RGB" || profile == "BestRGB" || profile == "Rec2020" || profile == "ACESp0" || profile == "ACESp1") { int cw = baseImg->getWidth(); int ch = baseImg->getHeight(); // put gamma TRC to 1 diff --git a/rtgui/icmpanel.cc b/rtgui/icmpanel.cc index 6aa1293b5..91fba165c 100644 --- a/rtgui/icmpanel.cc +++ b/rtgui/icmpanel.cc @@ -308,21 +308,21 @@ ICMPanel::ICMPanel() : FoldableToolPanel(this, "icm", M("TP_ICM_LABEL")), iuncha Gtk::Label* prilab = Gtk::manage(new Gtk::Label(M("TP_GAMMA_PRIM") + ":")); priHBox->pack_start(*prilab, Gtk::PACK_SHRINK); - wprimari = Gtk::manage(new MyComboBoxText()); - priHBox->pack_start(*wprimari, Gtk::PACK_EXPAND_WIDGET); + wprimaries = Gtk::manage(new MyComboBoxText()); + priHBox->pack_start(*wprimaries, Gtk::PACK_EXPAND_WIDGET); fgVBox->pack_start(*priHBox, Gtk::PACK_EXPAND_WIDGET); - wprimari->append(M("TP_GAMMA_PRIM_ACESP0")); - wprimari->append(M("TP_GAMMA_PRIM_ACESP1")); - wprimari->append(M("TP_GAMMA_PRIM_ADOBE")); - wprimari->append(M("TP_GAMMA_PRIM_PROPH")); - wprimari->append(M("TP_GAMMA_PRIM_REC2020")); - wprimari->append(M("TP_GAMMA_PRIM_SRGB")); - wprimari->append(M("TP_GAMMA_PRIM_WIDEG")); - wprimari->append(M("TP_GAMMA_PRIM_BEST")); - wprimari->append(M("TP_GAMMA_PRIM_BETA")); - wprimari->append(M("TP_GAMMA_PRIM_BRUCE")); - wprimari->append(M("TP_GAMMA_PRIM_FREE")); - wprimari->set_active(5); + wprimaries->append(M("TP_GAMMA_PRIM_ACESP0")); + wprimaries->append(M("TP_GAMMA_PRIM_ACESP1")); + wprimaries->append(M("TP_GAMMA_PRIM_ADOBE")); + wprimaries->append(M("TP_GAMMA_PRIM_PROPH")); + wprimaries->append(M("TP_GAMMA_PRIM_REC2020")); + wprimaries->append(M("TP_GAMMA_PRIM_SRGB")); + wprimaries->append(M("TP_GAMMA_PRIM_WIDEG")); + wprimaries->append(M("TP_GAMMA_PRIM_BEST")); + wprimaries->append(M("TP_GAMMA_PRIM_BETA")); + wprimaries->append(M("TP_GAMMA_PRIM_BRUCE")); + wprimaries->append(M("TP_GAMMA_PRIM_FREE")); + wprimaries->set_active(5); prifreeVBox = Gtk::manage(new Gtk::VBox()); Gtk::Image* gamuts0 = Gtk::manage(new RTImage("rt-logo-tiny.png")); @@ -467,7 +467,7 @@ ICMPanel::ICMPanel() : FoldableToolPanel(this, "icm", M("TP_ICM_LABEL")), iuncha ointentconn = ointent->signal_changed().connect(sigc::mem_fun(*this, &ICMPanel::oiChanged)); wgammaconn = wgamma->signal_changed().connect(sigc::mem_fun(*this, &ICMPanel::gpChanged)); dcpillconn = dcpIll->signal_changed().connect(sigc::mem_fun(*this, &ICMPanel::dcpIlluminantChanged)); - wprimariconn = wprimari->signal_changed().connect(sigc::mem_fun(*this, &ICMPanel::wprimariChanged)); + wprimariesconn = wprimaries->signal_changed().connect(sigc::mem_fun(*this, &ICMPanel::wprimariesChanged)); wprofileconn = wprofile->signal_changed().connect(sigc::mem_fun(*this, &ICMPanel::wprofileChanged)); wtempconn = wtemp->signal_changed().connect(sigc::mem_fun(*this, &ICMPanel::wtempChanged)); wtrcinconn = wtrcin->signal_changed().connect(sigc::mem_fun(*this, &ICMPanel::wtrcinChanged)); @@ -659,7 +659,7 @@ void ICMPanel::read(const ProcParams* pp, const ParamsEdited* pedited) ConnectionBlocker ointentconn_(ointentconn); ConnectionBlocker wgammaconn_(wgammaconn); ConnectionBlocker dcpillconn_(dcpillconn); - ConnectionBlocker wprimariconn_(wprimariconn); + ConnectionBlocker wprimariesconn_(wprimariesconn); ConnectionBlocker wprofileconn_(wprofileconn); ConnectionBlocker wtempconn_(wtempconn); // ConnectionBlocker wtrcinconn_(wtrcinconn); @@ -700,31 +700,31 @@ void ICMPanel::read(const ProcParams* pp, const ParamsEdited* pedited) wgamma->set_active_text(pp->icm.gamma); - if (pp->icm.wprimari == "acesp0") { - wprimari->set_active(0); - } else if (pp->icm.wprimari == "acesp1") { - wprimari->set_active(1); - } else if (pp->icm.wprimari == "adob") { - wprimari->set_active(2); - } else if (pp->icm.wprimari == "proph") { - wprimari->set_active(3); - } else if (pp->icm.wprimari == "rec2020") { - wprimari->set_active(4); - } else if (pp->icm.wprimari == "srgb") { - wprimari->set_active(5); - } else if (pp->icm.wprimari == "wideg") { - wprimari->set_active(6); - } else if (pp->icm.wprimari == "BestRGB") { - wprimari->set_active(7); - } else if (pp->icm.wprimari == "BetaRGB") { - wprimari->set_active(8); - } else if (pp->icm.wprimari == "BruceRGB") { - wprimari->set_active(9); - } else if (pp->icm.wprimari == "pfree") { - wprimari->set_active(10); + if (pp->icm.wprimaries == "Acesp0") { + wprimaries->set_active(0); + } else if (pp->icm.wprimaries == "Acesp1") { + wprimaries->set_active(1); + } else if (pp->icm.wprimaries == "Adobe") { + wprimaries->set_active(2); + } else if (pp->icm.wprimaries == "Prophoto") { + wprimaries->set_active(3); + } else if (pp->icm.wprimaries == "Rec2020") { + wprimaries->set_active(4); + } else if (pp->icm.wprimaries == "sRGB") { + wprimaries->set_active(5); + } else if (pp->icm.wprimaries == "Widegamut") { + wprimaries->set_active(6); + } else if (pp->icm.wprimaries == "BestRGB") { + wprimaries->set_active(7); + } else if (pp->icm.wprimaries == "BetaRGB") { + wprimaries->set_active(8); + } else if (pp->icm.wprimaries == "BruceRGB") { + wprimaries->set_active(9); + } else if (pp->icm.wprimaries == "pfree") { + wprimaries->set_active(10); } - if (wprimari->get_active_row_number() == 10) { + if (wprimaries->get_active_row_number() == 10) { prifreeVBox->set_sensitive(true); } else { prifreeVBox->set_sensitive(false); @@ -745,7 +745,7 @@ void ICMPanel::read(const ProcParams* pp, const ParamsEdited* pedited) wtemp->set_active(5); } else if (pp->icm.wtemp == "D80") { wtemp->set_active(6); - } else if (pp->icm.wtemp == "INC") { + } else if (pp->icm.wtemp == "stdA") { wtemp->set_active(7); } @@ -764,14 +764,14 @@ void ICMPanel::read(const ProcParams* pp, const ParamsEdited* pedited) } - if (wprimari->get_active_row_number() == 10) { + if (wprimaries->get_active_row_number() == 10) { wprofile->set_active(2); } gpChanged(); wprofileChanged(); wtempChanged(); - wprimariChanged(); + wprimariesChanged(); wtrcinChanged(); if (pp->icm.output == ColorManagementParams::NoICMString) { @@ -807,7 +807,7 @@ void ICMPanel::read(const ProcParams* pp, const ParamsEdited* pedited) slpos->set_sensitive(pp->icm.freegamma); slpos->set_sensitive(pp->icm.gamma == "Free"); updateRenderingIntent(pp->icm.output); - wprimari->set_sensitive(pp->icm.freegamma); + wprimaries->set_sensitive(pp->icm.freegamma); wprofile->set_sensitive(pp->icm.freegamma); if (wprofile->get_active_row_number() == 2) { @@ -860,8 +860,8 @@ void ICMPanel::read(const ProcParams* pp, const ParamsEdited* pedited) wgamma->set_active_text(M("GENERAL_UNCHANGED")); } - if (!pedited->icm.wprimari) { - wprimari->set_active_text(M("GENERAL_UNCHANGED")); + if (!pedited->icm.wprimaries) { + wprimaries->set_active_text(M("GENERAL_UNCHANGED")); } if (!pedited->icm.wprofile) { @@ -916,7 +916,7 @@ void ICMPanel::write(ProcParams* pp, ParamsEdited* pedited) pp->icm.working = wnames->get_active_text(); pp->icm.gamma = wgamma->get_active_text(); pp->icm.dcpIlluminant = rtengine::max(dcpIll->get_active_row_number(), 0); - pp->icm.wprimari = wprimari->get_active_text(); + pp->icm.wprimaries = wprimaries->get_active_text(); pp->icm.wtemp = wtemp->get_active_text(); pp->icm.wtrcin = wtrcin->get_active_text(); @@ -942,28 +942,28 @@ void ICMPanel::write(ProcParams* pp, ParamsEdited* pedited) pp->icm.wprofile = "v4"; } - if (wprimari->get_active_row_number() == 0) { - pp->icm.wprimari = "acesp0"; - } else if (wprimari->get_active_row_number() == 1) { - pp->icm.wprimari = "acesp1"; - } else if (wprimari->get_active_row_number() == 2) { - pp->icm.wprimari = "adob"; - } else if (wprimari->get_active_row_number() == 3) { - pp->icm.wprimari = "proph"; - } else if (wprimari->get_active_row_number() == 4) { - pp->icm.wprimari = "rec2020"; - } else if (wprimari->get_active_row_number() == 5) { - pp->icm.wprimari = "srgb"; - } else if (wprimari->get_active_row_number() == 6) { - pp->icm.wprimari = "wideg"; - } else if (wprimari->get_active_row_number() == 7) { - pp->icm.wprimari = "BestRGB"; - } else if (wprimari->get_active_row_number() == 8) { - pp->icm.wprimari = "BetaRGB"; - } else if (wprimari->get_active_row_number() == 9) { - pp->icm.wprimari = "BruceRGB"; - } else if (wprimari->get_active_row_number() == 10) { - pp->icm.wprimari = "pfree"; + if (wprimaries->get_active_row_number() == 0) { + pp->icm.wprimaries = "Acesp0"; + } else if (wprimaries->get_active_row_number() == 1) { + pp->icm.wprimaries = "Acesp1"; + } else if (wprimaries->get_active_row_number() == 2) { + pp->icm.wprimaries = "Adobe"; + } else if (wprimaries->get_active_row_number() == 3) { + pp->icm.wprimaries = "Prophoto"; + } else if (wprimaries->get_active_row_number() == 4) { + pp->icm.wprimaries = "Rec2020"; + } else if (wprimaries->get_active_row_number() == 5) { + pp->icm.wprimaries = "sRGB"; + } else if (wprimaries->get_active_row_number() == 6) { + pp->icm.wprimaries = "Widegamut"; + } else if (wprimaries->get_active_row_number() == 7) { + pp->icm.wprimaries = "BestRGB"; + } else if (wprimaries->get_active_row_number() == 8) { + pp->icm.wprimaries = "BetaRGB"; + } else if (wprimaries->get_active_row_number() == 9) { + pp->icm.wprimaries = "BruceRGB"; + } else if (wprimaries->get_active_row_number() == 10) { + pp->icm.wprimaries = "pfree"; } if (wtemp->get_active_row_number() == 0) { @@ -981,7 +981,7 @@ void ICMPanel::write(ProcParams* pp, ParamsEdited* pedited) } else if (wtemp->get_active_row_number() == 6) { pp->icm.wtemp = "D80"; } else if (wtemp->get_active_row_number() == 7) { - pp->icm.wtemp = "INC"; + pp->icm.wtemp = "stdA"; } if (wtrcin->get_active_row_number() == 0) { @@ -1031,7 +1031,7 @@ void ICMPanel::write(ProcParams* pp, ParamsEdited* pedited) pedited->icm.gamm = gamm->getEditedState(); pedited->icm.slop = slop->getEditedState(); - pedited->icm.wprimari = wprimari->get_active_text() != M("GENERAL_UNCHANGED"); + pedited->icm.wprimaries = wprimaries->get_active_text() != M("GENERAL_UNCHANGED"); pedited->icm.wprofile = wprofile->get_active_text() != M("GENERAL_UNCHANGED"); pedited->icm.wtemp = wtemp->get_active_text() != M("GENERAL_UNCHANGED"); pedited->icm.wtrcin = wtrcin->get_active_text() != M("GENERAL_UNCHANGED"); @@ -1135,20 +1135,20 @@ void ICMPanel::wpChanged() } } -void ICMPanel::wprimariChanged() +void ICMPanel::wprimariesChanged() { - if (wprimari->get_active_row_number() == 10) { + if (wprimaries->get_active_row_number() == 10) { prifreeVBox->set_sensitive(true); } else { prifreeVBox->set_sensitive(false); } - if (wprimari->get_active_row_number() == 10) { + if (wprimaries->get_active_row_number() == 10) { wprofile->set_active(2); } if (listener) { - listener->panelChanged(EvICMprimariMethod, wprimari->get_active_text()); + listener->panelChanged(EvICMprimariMethod, wprimaries->get_active_text()); } } @@ -1402,7 +1402,7 @@ void ICMPanel::GamChanged() wgamma->set_sensitive(true); gampos->set_sensitive(true); slpos->set_sensitive(true); - wprimari->set_sensitive(true); + wprimaries->set_sensitive(true); wprofile->set_sensitive(true); //wtemp->set_sensitive(true); @@ -1412,7 +1412,7 @@ void ICMPanel::GamChanged() priHBox->set_sensitive(true); - if (wprimari->get_active_row_number() == 10) { + if (wprimaries->get_active_row_number() == 10) { prifreeVBox->set_sensitive(true); } else { prifreeVBox->set_sensitive(false); @@ -1430,7 +1430,7 @@ void ICMPanel::GamChanged() wgamma->set_sensitive(false); gampos->set_sensitive(false); slpos->set_sensitive(false); - wprimari->set_sensitive(false); + wprimaries->set_sensitive(false); wprofile->set_sensitive(false); if (wprofile->get_active_row_number() != 2) { @@ -1621,7 +1621,7 @@ void ICMPanel::setBatchMode(bool batchMode) ointent->show(); wnames->append(M("GENERAL_UNCHANGED")); wgamma->append(M("GENERAL_UNCHANGED")); - wprimari->append(M("GENERAL_UNCHANGED")); + wprimaries->append(M("GENERAL_UNCHANGED")); wprofile->append(M("GENERAL_UNCHANGED")); wtemp->append(M("GENERAL_UNCHANGED")); wtrcin->append(M("GENERAL_UNCHANGED")); diff --git a/rtgui/icmpanel.h b/rtgui/icmpanel.h index 57e0be5cd..45f97e619 100644 --- a/rtgui/icmpanel.h +++ b/rtgui/icmpanel.h @@ -116,8 +116,8 @@ private: sigc::connection wnamesconn; MyComboBoxText* wgamma; sigc::connection wgammaconn; - MyComboBoxText* wprimari; - sigc::connection wprimariconn; + MyComboBoxText* wprimaries; + sigc::connection wprimariesconn; MyComboBoxText* wprofile; sigc::connection wprofileconn; MyComboBoxText* wtemp; @@ -153,7 +153,7 @@ public: void setAdjusterBehavior(bool gammaadd, bool slopeadd); void wpChanged(); - void wprimariChanged(); + void wprimariesChanged(); void wprofileChanged(); void wtempChanged(); void wtrcinChanged(); diff --git a/rtgui/paramsedited.cc b/rtgui/paramsedited.cc index cfad23f54..4de401a66 100644 --- a/rtgui/paramsedited.cc +++ b/rtgui/paramsedited.cc @@ -396,7 +396,7 @@ void ParamsEdited::set(bool v) icm.pbluy = v; icm.gamm = v; icm.slop = v; - icm.wprimari = v; + icm.wprimaries = v; icm.wprofile = v; icm.wtemp = v; icm.wtrcin = v; @@ -955,7 +955,7 @@ void ParamsEdited::initFrom(const std::vector& icm.gamm = icm.gamm && p.icm.gamm == other.icm.gamm; icm.slop = icm.slop && p.icm.slop == other.icm.slop; - icm.wprimari = icm.wprimari && p.icm.wprimari == other.icm.wprimari; + icm.wprimaries = icm.wprimaries && p.icm.wprimaries == other.icm.wprimaries; icm.wprofile = icm.wprofile && p.icm.wprofile == other.icm.wprofile; icm.wtemp = icm.wtemp && p.icm.wtemp == other.icm.wtemp; icm.wtrcin = icm.wtrcin && p.icm.wtrcin == other.icm.wtrcin; @@ -2493,8 +2493,8 @@ void ParamsEdited::combine(rtengine::procparams::ProcParams& toEdit, const rteng toEdit.icm.gamma = mods.icm.gamma; } - if (icm.wprimari) { - toEdit.icm.wprimari = mods.icm.wprimari; + if (icm.wprimaries) { + toEdit.icm.wprimaries = mods.icm.wprimaries; } if (icm.wprofile) { diff --git a/rtgui/paramsedited.h b/rtgui/paramsedited.h index 4a83fde73..21e9047dc 100644 --- a/rtgui/paramsedited.h +++ b/rtgui/paramsedited.h @@ -595,7 +595,7 @@ public: bool pblux; bool pbluy; bool freegamma; - bool wprimari; + bool wprimaries; bool wprofile; bool wtemp; bool gamm;