diff --git a/rtengine/improcfun.cc b/rtengine/improcfun.cc index f5ca1c55d..b5e555a1f 100644 --- a/rtengine/improcfun.cc +++ b/rtengine/improcfun.cc @@ -208,7 +208,7 @@ void ImProcFunctions::firstAnalysis (const Imagefloat* const original, const Pro } // Copyright (c) 2012 Jacques Desmis -void ImProcFunctions::ciecam_02 (CieImage* ncie, double adap, int begh, int endh, int pW, int pwb, LabImage* lab, const ProcParams* params , +void ImProcFunctions::ciecam_02 (CieImage* ncie, double adap, int begh, int endh, int pW, int pwb, LabImage* lab, const ProcParams* params, const ColorAppearance & customColCurve1, const ColorAppearance & customColCurve2, const ColorAppearance & customColCurve3, LUTu & histLCAM, LUTu & histCCAM, LUTf & CAMBrightCurveJ, LUTf & CAMBrightCurveQ, float &mean, int Iterates, int scale, bool execsharp, double &d, int rtt) { @@ -616,7 +616,7 @@ void ImProcFunctions::ciecam_02 (CieImage* ncie, double adap, int begh, int endh x, y, z, xw1, yw1, zw1, yb, la, - f, c, nc, pilot, gamu , n, nbb, ncb, pfl, cz, d ); + f, c, nc, pilot, gamu, n, nbb, ncb, pfl, cz, d ); Jpro = J; Cpro = C; hpro = h; @@ -644,7 +644,7 @@ void ImProcFunctions::ciecam_02 (CieImage* ncie, double adap, int begh, int endh schr = -99.8; } - Ciecam02::curvecolor (schr, Sp , sres, parsat); + Ciecam02::curvecolor (schr, Sp, sres, parsat); double coe = pow (fl, 0.25); float dred = 100.f; // in C mode float protect_red = 80.0f; // in C mode @@ -680,9 +680,9 @@ void ImProcFunctions::ciecam_02 (CieImage* ncie, double adap, int begh, int endh } if (alg == 3 || alg == 2) { - Ciecam02::curvecolor (mchr, Mp , sres, parsat); + Ciecam02::curvecolor (mchr, Mp, sres, parsat); } else { - Ciecam02::curvecolor (0.0, Mp , sres, parsat); //colorfullness + Ciecam02::curvecolor (0.0, Mp, sres, parsat); //colorfullness } float dred = 100.f; //in C mode @@ -717,9 +717,9 @@ void ImProcFunctions::ciecam_02 (CieImage* ncie, double adap, int begh, int endh } if (alg == 3) { - Ciecam02::curvecolor (schr, Sp , sres, parsat); + Ciecam02::curvecolor (schr, Sp, sres, parsat); } else { - Ciecam02::curvecolor (0.0, Sp , sres, parsat); //saturation + Ciecam02::curvecolor (0.0, Sp, sres, parsat); //saturation } dred = 100.f; // in C mode @@ -739,9 +739,9 @@ void ImProcFunctions::ciecam_02 (CieImage* ncie, double adap, int begh, int endh } if (alg != 2) { - Ciecam02::curvecolor (chr, Cp , sres, parsat); + Ciecam02::curvecolor (chr, Cp, sres, parsat); } else { - Ciecam02::curvecolor (0.0, Cp , sres, parsat); //chroma + Ciecam02::curvecolor (0.0, Cp, sres, parsat); //chroma } dred = 55.f; @@ -1231,7 +1231,7 @@ void ImProcFunctions::ciecam_02 (CieImage* ncie, double adap, int begh, int endh float chrom = 50.f; { int hotbad = 0; - ImProcFunctions::badpixcam (ncie, artifact, 5, 2 , b_l, t_l, t_r, b_r, params->dirpyrequalizer.skinprotect , chrom, hotbad); //enabled remove artifacts for cbDL + ImProcFunctions::badpixcam (ncie, artifact, 5, 2, b_l, t_l, t_r, b_r, params->dirpyrequalizer.skinprotect, chrom, hotbad); //enabled remove artifacts for cbDL } } } @@ -2030,7 +2030,7 @@ void ImProcFunctions::ciecam_02float (CieImage* ncie, float adap, int begh, int float Cp = (spro * spro * Qpro) / (1000000.f); Cpro = Cp * 100.f; float sres; - Ciecam02::curvecolorfloat (chr, Cp , sres, 1.8f); + Ciecam02::curvecolorfloat (chr, Cp, sres, 1.8f); Color::skinredfloat (Jpro, hpro, sres, Cp, 55.f, 30.f, 1, rstprotection, 100.f, Cpro); } else if (alg == 1) { // Lightness saturation @@ -2038,7 +2038,7 @@ void ImProcFunctions::ciecam_02float (CieImage* ncie, float adap, int begh, int float sres; float Sp = spro / 100.0f; float parsat = 1.5f; //parsat=1.5 =>saturation ; 1.8 => chroma ; 2.5 => colorfullness (personal evaluation) - Ciecam02::curvecolorfloat (schr, Sp , sres, parsat); + Ciecam02::curvecolorfloat (schr, Sp, sres, parsat); float dred = 100.f; // in C mode float protect_red = 80.0f; // in C mode dred = 100.0f * sqrtf ((dred * coe) / Qpro); @@ -2050,7 +2050,7 @@ void ImProcFunctions::ciecam_02float (CieImage* ncie, float adap, int begh, int Qpro = CAMBrightCurveQ[ (float) (Qpro * coefQ)]; //brightness and contrast float Mp, sres; Mp = Mpro / 100.0f; - Ciecam02::curvecolorfloat (mchr, Mp , sres, 2.5f); + Ciecam02::curvecolorfloat (mchr, Mp, sres, 2.5f); float dred = 100.f; //in C mode float protect_red = 80.0f; // in C mode dred *= coe; //in M mode @@ -2065,7 +2065,7 @@ void ImProcFunctions::ciecam_02float (CieImage* ncie, float adap, int begh, int float Mp, sres; Mp = Mpro / 100.0f; - Ciecam02::curvecolorfloat (mchr, Mp , sres, 2.5f); + Ciecam02::curvecolorfloat (mchr, Mp, sres, 2.5f); float dred = 100.f; //in C mode float protect_red = 80.0f; // in C mode dred *= coe; //in M mode @@ -2082,7 +2082,7 @@ void ImProcFunctions::ciecam_02float (CieImage* ncie, float adap, int begh, int Jpro = CAMBrightCurveJ[ (float) (Jpro * 327.68f)]; //lightness CIECAM02 + contrast float Sp = spro / 100.0f; - Ciecam02::curvecolorfloat (schr, Sp , sres, 1.5f); + Ciecam02::curvecolorfloat (schr, Sp, sres, 1.5f); dred = 100.f; // in C mode protect_red = 80.0f; // in C mode dred = 100.0f * sqrtf ((dred * coe) / Q); @@ -2091,7 +2091,7 @@ void ImProcFunctions::ciecam_02float (CieImage* ncie, float adap, int begh, int Qpro = QproFactor * sqrtf (Jpro); float Cp = (spro * spro * Qpro) / (1000000.f); Cpro = Cp * 100.f; - Ciecam02::curvecolorfloat (chr, Cp , sres, 1.8f); + Ciecam02::curvecolorfloat (chr, Cp, sres, 1.8f); Color::skinredfloat (Jpro, hpro, sres, Cp, 55.f, 30.f, 1, rstprotection, 100.f, Cpro); // disabled this code, Issue 2690 // if(Jpro < 1.f && Cpro > 12.f) Cpro=12.f;//reduce artifacts by "pseudo gamut control CIECAM" @@ -2589,7 +2589,7 @@ void ImProcFunctions::ciecam_02float (CieImage* ncie, float adap, int begh, int int hotbad = 0; float chrom = 50.f; lab->deleteLab(); - ImProcFunctions::badpixcam (ncie, artifact, 5, 2 , b_l, t_l, t_r, b_r, params->dirpyrequalizer.skinprotect, chrom, hotbad); //enabled remove artifacts for cbDL + ImProcFunctions::badpixcam (ncie, artifact, 5, 2, b_l, t_l, t_r, b_r, params->dirpyrequalizer.skinprotect, chrom, hotbad); //enabled remove artifacts for cbDL lab->reallocLab(); } } @@ -2951,15 +2951,15 @@ filmlike_clip (float *r, float *g, float *b) } void ImProcFunctions::rgbProc (Imagefloat* working, LabImage* lab, PipetteBuffer *pipetteBuffer, LUTf & hltonecurve, LUTf & shtonecurve, LUTf & tonecurve, - SHMap* shmap, int sat, LUTf & rCurve, LUTf & gCurve, LUTf & bCurve, float satLimit , float satLimitOpacity, const ColorGradientCurve & ctColorCurve, const OpacityCurve & ctOpacityCurve, bool opautili, LUTf & clToningcurve, LUTf & cl2Toningcurve, + SHMap* shmap, int sat, LUTf & rCurve, LUTf & gCurve, LUTf & bCurve, float satLimit, float satLimitOpacity, const ColorGradientCurve & ctColorCurve, const OpacityCurve & ctOpacityCurve, bool opautili, LUTf & clToningcurve, LUTf & cl2Toningcurve, const ToneCurve & customToneCurve1, const ToneCurve & customToneCurve2, const ToneCurve & customToneCurvebw1, const ToneCurve & customToneCurvebw2, double &rrm, double &ggm, double &bbm, float &autor, float &autog, float &autob, DCPProfile *dcpProf, const DCPProfile::ApplyState &asIn, LUTu &histToneCurve ) { - rgbProc (working, lab, pipetteBuffer, hltonecurve, shtonecurve, tonecurve, shmap, sat, rCurve, gCurve, bCurve, satLimit , satLimitOpacity, ctColorCurve, ctOpacityCurve, opautili, clToningcurve, cl2Toningcurve, customToneCurve1, customToneCurve2, customToneCurvebw1, customToneCurvebw2, rrm, ggm, bbm, autor, autog, autob, params->toneCurve.expcomp, params->toneCurve.hlcompr, params->toneCurve.hlcomprthresh, dcpProf, asIn, histToneCurve); + rgbProc (working, lab, pipetteBuffer, hltonecurve, shtonecurve, tonecurve, shmap, sat, rCurve, gCurve, bCurve, satLimit, satLimitOpacity, ctColorCurve, ctOpacityCurve, opautili, clToningcurve, cl2Toningcurve, customToneCurve1, customToneCurve2, customToneCurvebw1, customToneCurvebw2, rrm, ggm, bbm, autor, autog, autob, params->toneCurve.expcomp, params->toneCurve.hlcompr, params->toneCurve.hlcomprthresh, dcpProf, asIn, histToneCurve); } // Process RGB image and convert to LAB space void ImProcFunctions::rgbProc (Imagefloat* working, LabImage* lab, PipetteBuffer *pipetteBuffer, LUTf & hltonecurve, LUTf & shtonecurve, LUTf & tonecurve, - SHMap* shmap, int sat, LUTf & rCurve, LUTf & gCurve, LUTf & bCurve, float satLimit , float satLimitOpacity, const ColorGradientCurve & ctColorCurve, const OpacityCurve & ctOpacityCurve, bool opautili, LUTf & clToningcurve, LUTf & cl2Toningcurve, + SHMap* shmap, int sat, LUTf & rCurve, LUTf & gCurve, LUTf & bCurve, float satLimit, float satLimitOpacity, const ColorGradientCurve & ctColorCurve, const OpacityCurve & ctOpacityCurve, bool opautili, LUTf & clToningcurve, LUTf & cl2Toningcurve, const ToneCurve & customToneCurve1, const ToneCurve & customToneCurve2, const ToneCurve & customToneCurvebw1, const ToneCurve & customToneCurvebw2, double &rrm, double &ggm, double &bbm, float &autor, float &autog, float &autob, double expcomp, int hlcompr, int hlcomprthresh, DCPProfile *dcpProf, const DCPProfile::ApplyState &asIn, LUTu &histToneCurve ) { BENCHFUN diff --git a/rtengine/procparams.cc b/rtengine/procparams.cc index 7adf39df5..93571122f 100644 --- a/rtengine/procparams.cc +++ b/rtengine/procparams.cc @@ -70,40 +70,40 @@ bool ToneCurveParams::HLReconstructionNecessary (LUTu &histRedRaw, LUTu &histGre void WBParams::init() { // Creation of the different methods and its associated temperature value - wbEntries.push_back (new WBEntry ("Camera" , WBT_CAMERA, M ("TP_WBALANCE_CAMERA"), 0, 1.f, 1.f, 0.f)); - wbEntries.push_back (new WBEntry ("Auto" , WBT_AUTO, M ("TP_WBALANCE_AUTO"), 0, 1.f, 1.f, 0.f)); - wbEntries.push_back (new WBEntry ("Daylight" , WBT_DAYLIGHT, M ("TP_WBALANCE_DAYLIGHT"), 5300, 1.f, 1.f, 0.f)); - wbEntries.push_back (new WBEntry ("Cloudy" , WBT_CLOUDY, M ("TP_WBALANCE_CLOUDY"), 6200, 1.f, 1.f, 0.f)); - wbEntries.push_back (new WBEntry ("Shade" , WBT_SHADE, M ("TP_WBALANCE_SHADE"), 7600, 1.f, 1.f, 0.f)); - wbEntries.push_back (new WBEntry ("Water 1" , WBT_WATER, M ("TP_WBALANCE_WATER1"), 35000, 0.3f, 1.1f, 0.f)); - wbEntries.push_back (new WBEntry ("Water 2" , WBT_WATER, M ("TP_WBALANCE_WATER2"), 48000, 0.63f, 1.38f, 0.f)); - wbEntries.push_back (new WBEntry ("Tungsten" , WBT_TUNGSTEN, M ("TP_WBALANCE_TUNGSTEN"), 2856, 1.f, 1.f, 0.f)); - wbEntries.push_back (new WBEntry ("Fluo F1" , WBT_FLUORESCENT, M ("TP_WBALANCE_FLUO1"), 6430, 1.f, 1.f, 0.f)); - wbEntries.push_back (new WBEntry ("Fluo F2" , WBT_FLUORESCENT, M ("TP_WBALANCE_FLUO2"), 4230, 1.f, 1.f, 0.f)); - wbEntries.push_back (new WBEntry ("Fluo F3" , WBT_FLUORESCENT, M ("TP_WBALANCE_FLUO3"), 3450, 1.f, 1.f, 0.f)); - wbEntries.push_back (new WBEntry ("Fluo F4" , WBT_FLUORESCENT, M ("TP_WBALANCE_FLUO4"), 2940, 1.f, 1.f, 0.f)); - wbEntries.push_back (new WBEntry ("Fluo F5" , WBT_FLUORESCENT, M ("TP_WBALANCE_FLUO5"), 6350, 1.f, 1.f, 0.f)); - wbEntries.push_back (new WBEntry ("Fluo F6" , WBT_FLUORESCENT, M ("TP_WBALANCE_FLUO6"), 4150, 1.f, 1.f, 0.f)); - wbEntries.push_back (new WBEntry ("Fluo F7" , WBT_FLUORESCENT, M ("TP_WBALANCE_FLUO7"), 6500, 1.f, 1.f, 0.f)); - wbEntries.push_back (new WBEntry ("Fluo F8" , WBT_FLUORESCENT, M ("TP_WBALANCE_FLUO8"), 5020, 1.f, 1.f, 0.f)); - wbEntries.push_back (new WBEntry ("Fluo F9" , WBT_FLUORESCENT, M ("TP_WBALANCE_FLUO9"), 4330, 1.f, 1.f, 0.f)); - wbEntries.push_back (new WBEntry ("Fluo F10" , WBT_FLUORESCENT, M ("TP_WBALANCE_FLUO10"), 5300, 1.f, 1.f, 0.f)); - wbEntries.push_back (new WBEntry ("Fluo F11" , WBT_FLUORESCENT, M ("TP_WBALANCE_FLUO11"), 4000, 1.f, 1.f, 0.f)); - wbEntries.push_back (new WBEntry ("Fluo F12" , WBT_FLUORESCENT, M ("TP_WBALANCE_FLUO12"), 3000, 1.f, 1.f, 0.f)); - wbEntries.push_back (new WBEntry ("HMI Lamp" , WBT_LAMP, M ("TP_WBALANCE_HMI"), 4800, 1.f, 1.f, 0.f)); - wbEntries.push_back (new WBEntry ("GTI Lamp" , WBT_LAMP, M ("TP_WBALANCE_GTI"), 5000, 1.f, 1.f, 0.f)); - wbEntries.push_back (new WBEntry ("JudgeIII Lamp" , WBT_LAMP, M ("TP_WBALANCE_JUDGEIII"), 5100, 1.f, 1.f, 0.f)); - wbEntries.push_back (new WBEntry ("Solux Lamp 3500K" , WBT_LAMP, M ("TP_WBALANCE_SOLUX35"), 3480, 1.f, 1.f, 0.f)); - wbEntries.push_back (new WBEntry ("Solux Lamp 4100K" , WBT_LAMP, M ("TP_WBALANCE_SOLUX41"), 3930, 1.f, 1.f, 0.f)); - wbEntries.push_back (new WBEntry ("Solux Lamp 4700K" , WBT_LAMP, M ("TP_WBALANCE_SOLUX47"), 4700, 1.f, 1.f, 0.f)); - wbEntries.push_back (new WBEntry ("NG Solux Lamp 4700K" , WBT_LAMP, M ("TP_WBALANCE_SOLUX47_NG"), 4480, 1.f, 1.f, 0.f)); + wbEntries.push_back (new WBEntry ("Camera", WBT_CAMERA, M ("TP_WBALANCE_CAMERA"), 0, 1.f, 1.f, 0.f)); + wbEntries.push_back (new WBEntry ("Auto", WBT_AUTO, M ("TP_WBALANCE_AUTO"), 0, 1.f, 1.f, 0.f)); + wbEntries.push_back (new WBEntry ("Daylight", WBT_DAYLIGHT, M ("TP_WBALANCE_DAYLIGHT"), 5300, 1.f, 1.f, 0.f)); + wbEntries.push_back (new WBEntry ("Cloudy", WBT_CLOUDY, M ("TP_WBALANCE_CLOUDY"), 6200, 1.f, 1.f, 0.f)); + wbEntries.push_back (new WBEntry ("Shade", WBT_SHADE, M ("TP_WBALANCE_SHADE"), 7600, 1.f, 1.f, 0.f)); + wbEntries.push_back (new WBEntry ("Water 1", WBT_WATER, M ("TP_WBALANCE_WATER1"), 35000, 0.3f, 1.1f, 0.f)); + wbEntries.push_back (new WBEntry ("Water 2", WBT_WATER, M ("TP_WBALANCE_WATER2"), 48000, 0.63f, 1.38f, 0.f)); + wbEntries.push_back (new WBEntry ("Tungsten", WBT_TUNGSTEN, M ("TP_WBALANCE_TUNGSTEN"), 2856, 1.f, 1.f, 0.f)); + wbEntries.push_back (new WBEntry ("Fluo F1", WBT_FLUORESCENT, M ("TP_WBALANCE_FLUO1"), 6430, 1.f, 1.f, 0.f)); + wbEntries.push_back (new WBEntry ("Fluo F2", WBT_FLUORESCENT, M ("TP_WBALANCE_FLUO2"), 4230, 1.f, 1.f, 0.f)); + wbEntries.push_back (new WBEntry ("Fluo F3", WBT_FLUORESCENT, M ("TP_WBALANCE_FLUO3"), 3450, 1.f, 1.f, 0.f)); + wbEntries.push_back (new WBEntry ("Fluo F4", WBT_FLUORESCENT, M ("TP_WBALANCE_FLUO4"), 2940, 1.f, 1.f, 0.f)); + wbEntries.push_back (new WBEntry ("Fluo F5", WBT_FLUORESCENT, M ("TP_WBALANCE_FLUO5"), 6350, 1.f, 1.f, 0.f)); + wbEntries.push_back (new WBEntry ("Fluo F6", WBT_FLUORESCENT, M ("TP_WBALANCE_FLUO6"), 4150, 1.f, 1.f, 0.f)); + wbEntries.push_back (new WBEntry ("Fluo F7", WBT_FLUORESCENT, M ("TP_WBALANCE_FLUO7"), 6500, 1.f, 1.f, 0.f)); + wbEntries.push_back (new WBEntry ("Fluo F8", WBT_FLUORESCENT, M ("TP_WBALANCE_FLUO8"), 5020, 1.f, 1.f, 0.f)); + wbEntries.push_back (new WBEntry ("Fluo F9", WBT_FLUORESCENT, M ("TP_WBALANCE_FLUO9"), 4330, 1.f, 1.f, 0.f)); + wbEntries.push_back (new WBEntry ("Fluo F10", WBT_FLUORESCENT, M ("TP_WBALANCE_FLUO10"), 5300, 1.f, 1.f, 0.f)); + wbEntries.push_back (new WBEntry ("Fluo F11", WBT_FLUORESCENT, M ("TP_WBALANCE_FLUO11"), 4000, 1.f, 1.f, 0.f)); + wbEntries.push_back (new WBEntry ("Fluo F12", WBT_FLUORESCENT, M ("TP_WBALANCE_FLUO12"), 3000, 1.f, 1.f, 0.f)); + wbEntries.push_back (new WBEntry ("HMI Lamp", WBT_LAMP, M ("TP_WBALANCE_HMI"), 4800, 1.f, 1.f, 0.f)); + wbEntries.push_back (new WBEntry ("GTI Lamp", WBT_LAMP, M ("TP_WBALANCE_GTI"), 5000, 1.f, 1.f, 0.f)); + wbEntries.push_back (new WBEntry ("JudgeIII Lamp", WBT_LAMP, M ("TP_WBALANCE_JUDGEIII"), 5100, 1.f, 1.f, 0.f)); + wbEntries.push_back (new WBEntry ("Solux Lamp 3500K", WBT_LAMP, M ("TP_WBALANCE_SOLUX35"), 3480, 1.f, 1.f, 0.f)); + wbEntries.push_back (new WBEntry ("Solux Lamp 4100K", WBT_LAMP, M ("TP_WBALANCE_SOLUX41"), 3930, 1.f, 1.f, 0.f)); + wbEntries.push_back (new WBEntry ("Solux Lamp 4700K", WBT_LAMP, M ("TP_WBALANCE_SOLUX47"), 4700, 1.f, 1.f, 0.f)); + wbEntries.push_back (new WBEntry ("NG Solux Lamp 4700K", WBT_LAMP, M ("TP_WBALANCE_SOLUX47_NG"), 4480, 1.f, 1.f, 0.f)); wbEntries.push_back (new WBEntry ("LED LSI Lumelex 2040", WBT_LED, M ("TP_WBALANCE_LED_LSI"), 2970, 1.f, 1.f, 0.f)); - wbEntries.push_back (new WBEntry ("LED CRS SP12 WWMR16" , WBT_LED, M ("TP_WBALANCE_LED_CRS"), 3050, 1.f, 1.f, 0.f)); - wbEntries.push_back (new WBEntry ("Flash 5500K" , WBT_FLASH, M ("TP_WBALANCE_FLASH55"), 5500, 1.f, 1.f, 0.f)); - wbEntries.push_back (new WBEntry ("Flash 6000K" , WBT_FLASH, M ("TP_WBALANCE_FLASH60"), 6000, 1.f, 1.f, 0.f)); - wbEntries.push_back (new WBEntry ("Flash 6500K" , WBT_FLASH, M ("TP_WBALANCE_FLASH65"), 6500, 1.f, 1.f, 0.f)); + wbEntries.push_back (new WBEntry ("LED CRS SP12 WWMR16", WBT_LED, M ("TP_WBALANCE_LED_CRS"), 3050, 1.f, 1.f, 0.f)); + wbEntries.push_back (new WBEntry ("Flash 5500K", WBT_FLASH, M ("TP_WBALANCE_FLASH55"), 5500, 1.f, 1.f, 0.f)); + wbEntries.push_back (new WBEntry ("Flash 6000K", WBT_FLASH, M ("TP_WBALANCE_FLASH60"), 6000, 1.f, 1.f, 0.f)); + wbEntries.push_back (new WBEntry ("Flash 6500K", WBT_FLASH, M ("TP_WBALANCE_FLASH65"), 6500, 1.f, 1.f, 0.f)); // Should remain the last one - wbEntries.push_back (new WBEntry ("Custom" , WBT_CUSTOM, M ("TP_WBALANCE_CUSTOM"), 0, 1.f, 1.f, 0.f)); + wbEntries.push_back (new WBEntry ("Custom", WBT_CUSTOM, M ("TP_WBALANCE_CUSTOM"), 0, 1.f, 1.f, 0.f)); } void WBParams::cleanup() diff --git a/rtengine/procparams.h b/rtengine/procparams.h index 67259c4f5..39f6eeaee 100644 --- a/rtengine/procparams.h +++ b/rtengine/procparams.h @@ -1108,7 +1108,7 @@ public: WaveletParams (); void setDefaults(); - void getCurves (WavCurve &cCurve, WavOpacityCurveRG &opacityCurveLUTRG , WavOpacityCurveBY &opacityCurveLUTBY, WavOpacityCurveW &opacityCurveLUTW, WavOpacityCurveWL &opacityCurveLUTWL) const; + void getCurves (WavCurve &cCurve, WavOpacityCurveRG &opacityCurveLUTRG, WavOpacityCurveBY &opacityCurveLUTBY, WavOpacityCurveW &opacityCurveLUTW, WavOpacityCurveWL &opacityCurveLUTWL) const; static void getDefaultCCWCurve (std::vector &curve); static void getDefaultOpacityCurveRG (std::vector &curve); static void getDefaultOpacityCurveBY (std::vector &curve); diff --git a/rtgui/colorappearance.h b/rtgui/colorappearance.h index c9097b33c..5f433b556 100644 --- a/rtgui/colorappearance.h +++ b/rtgui/colorappearance.h @@ -29,12 +29,12 @@ #include "colorprovider.h" class ColorAppearance final : - public ToolParamBlock, - public AdjusterListener, - public FoldableToolPanel, - public rtengine::AutoCamListener, - public CurveListener, - public ColorProvider + public ToolParamBlock, + public AdjusterListener, + public FoldableToolPanel, + public rtengine::AutoCamListener, + public CurveListener, + public ColorProvider { public: ColorAppearance (); diff --git a/rtgui/options.cc b/rtgui/options.cc index 402fb5bb5..6d01cb8ed 100644 --- a/rtgui/options.cc +++ b/rtgui/options.cc @@ -640,8 +640,8 @@ void Options::setDefaults () #else rtSettings.iccDirectory = "/usr/share/color/icc"; #endif - // rtSettings.viewingdevice = 0; - // rtSettings.viewingdevicegrey = 3; +// rtSettings.viewingdevice = 0; +// rtSettings.viewingdevicegrey = 3; rtSettings.viewinggreySc = 1; rtSettings.leveldnv = 2; rtSettings.leveldnti = 0; @@ -1547,15 +1547,16 @@ int Options::readFromFile (Glib::ustring fname) if (keyFile.has_key ("Color Management", "DenoiseLabgamma")) { rtSettings.denoiselabgamma = keyFile.get_integer ("Color Management", "DenoiseLabgamma"); } -/* - if (keyFile.has_key ("Color Management", "view")) { - rtSettings.viewingdevice = keyFile.get_integer ("Color Management", "view"); - } - if (keyFile.has_key ("Color Management", "grey")) { - rtSettings.viewingdevicegrey = keyFile.get_integer ("Color Management", "grey"); - } -*/ + /* + if (keyFile.has_key ("Color Management", "view")) { + rtSettings.viewingdevice = keyFile.get_integer ("Color Management", "view"); + } + + if (keyFile.has_key ("Color Management", "grey")) { + rtSettings.viewingdevicegrey = keyFile.get_integer ("Color Management", "grey"); + } + */ if (keyFile.has_key ("Color Management", "greySc")) { rtSettings.viewinggreySc = keyFile.get_integer ("Color Management", "greySc"); } @@ -1831,6 +1832,7 @@ int Options::readFromFile (Glib::ustring fname) if (keyFile.has_key ("Fast Export", "fastexport_resize_height" )) { fastexport_resize_height = keyFile.get_integer ("Fast Export", "fastexport_resize_height" ); } + if (keyFile.has_key ("Fast Export", "fastexport_use_fast_pipeline" )) { fastexport_use_fast_pipeline = keyFile.get_integer ("Fast Export", "fastexport_use_fast_pipeline" ); } @@ -1853,8 +1855,9 @@ int Options::readFromFile (Glib::ustring fname) safeDirGet (keyFile, "Dialogs", "LastVibranceCurvesDir", lastVibranceCurvesDir); safeDirGet (keyFile, "Dialogs", "LastProfilingReferenceDir", lastProfilingReferenceDir); safeDirGet (keyFile, "Dialogs", "LastLensProfileDir", lastLensProfileDir); + if (keyFile.has_key ("Dialogs", "GimpPluginShowInfoDialog")) { - gimpPluginShowInfoDialog = keyFile.get_boolean("Dialogs", "GimpPluginShowInfoDialog"); + gimpPluginShowInfoDialog = keyFile.get_boolean ("Dialogs", "GimpPluginShowInfoDialog"); } } @@ -2127,8 +2130,8 @@ int Options::saveToFile (Glib::ustring fname) keyFile.set_boolean ("Color Management", "RGBcurvesLumamode_Gamut", rtSettings.rgbcurveslumamode_gamut); keyFile.set_integer ("Color Management", "Intent", rtSettings.monitorIntent); keyFile.set_boolean ("Color Management", "MonitorBPC", rtSettings.monitorBPC); - // keyFile.set_integer ("Color Management", "view", rtSettings.viewingdevice); - // keyFile.set_integer ("Color Management", "grey", rtSettings.viewingdevicegrey); +// keyFile.set_integer ("Color Management", "view", rtSettings.viewingdevice); +// keyFile.set_integer ("Color Management", "grey", rtSettings.viewingdevicegrey); keyFile.set_integer ("Color Management", "greySc", rtSettings.viewinggreySc); keyFile.set_string ("Color Management", "AdobeRGB", rtSettings.adobe); @@ -2221,7 +2224,7 @@ int Options::saveToFile (Glib::ustring fname) keyFile.set_string ("Dialogs", "LastVibranceCurvesDir", lastVibranceCurvesDir); keyFile.set_string ("Dialogs", "LastProfilingReferenceDir", lastProfilingReferenceDir); keyFile.set_string ("Dialogs", "LastLensProfileDir", lastLensProfileDir); - keyFile.set_boolean("Dialogs", "GimpPluginShowInfoDialog", gimpPluginShowInfoDialog); + keyFile.set_boolean ("Dialogs", "GimpPluginShowInfoDialog", gimpPluginShowInfoDialog); keyData = keyFile.to_data (); @@ -2236,7 +2239,7 @@ int Options::saveToFile (Glib::ustring fname) if (f == nullptr) { std::cout << "Warning! Unable to save your preferences to: " << fname << std::endl; #ifndef RAWTHERAPEE_CLI - Glib::ustring msg_ = Glib::ustring::compose(M("MAIN_MSG_WRITEFAILED"), fname.c_str()); + Glib::ustring msg_ = Glib::ustring::compose (M ("MAIN_MSG_WRITEFAILED"), fname.c_str()); //writeFailed (getToplevelWindow (this), msg_); Gtk::MessageDialog msgd (msg_, true, Gtk::MESSAGE_WARNING, Gtk::BUTTONS_CLOSE, true); msgd.run (); diff --git a/rtgui/preferences.cc b/rtgui/preferences.cc index 1cdd8ae39..eda2932ab 100644 --- a/rtgui/preferences.cc +++ b/rtgui/preferences.cc @@ -283,11 +283,11 @@ Gtk::Widget* Preferences::getBatchProcPanel () mi = behModel->append (); mi->set_value (behavColumns.label, M ("TP_COLORTONING_LABEL")); - appendBehavList (mi, M ("TP_COLORTONING_SPLITCOCO"), ADDSET_COLORTONING_SPLIT , true); - appendBehavList (mi, M ("TP_COLORTONING_SATURATIONTHRESHOLD"), ADDSET_COLORTONING_SATTHRESHOLD , true); - appendBehavList (mi, M ("TP_COLORTONING_SATURATEDOPACITY"), ADDSET_COLORTONING_SATOPACITY , true); - appendBehavList (mi, M ("TP_COLORTONING_BALANCE"), ADDSET_COLORTONING_BALANCE , true); - appendBehavList (mi, M ("TP_COLORTONING_STRENGTH"), ADDSET_COLORTONING_STRENGTH , true); + appendBehavList (mi, M ("TP_COLORTONING_SPLITCOCO"), ADDSET_COLORTONING_SPLIT, true); + appendBehavList (mi, M ("TP_COLORTONING_SATURATIONTHRESHOLD"), ADDSET_COLORTONING_SATTHRESHOLD, true); + appendBehavList (mi, M ("TP_COLORTONING_SATURATEDOPACITY"), ADDSET_COLORTONING_SATOPACITY, true); + appendBehavList (mi, M ("TP_COLORTONING_BALANCE"), ADDSET_COLORTONING_BALANCE, true); + appendBehavList (mi, M ("TP_COLORTONING_STRENGTH"), ADDSET_COLORTONING_STRENGTH, true); mi = behModel->append (); mi->set_value (behavColumns.label, M ("TP_ROTATE_LABEL")); @@ -509,14 +509,14 @@ Gtk::Widget* Preferences::getProcParamsPanel () Gtk::HBox* hb42 = Gtk::manage (new Gtk::HBox ()); darkFrameDir = Gtk::manage (new Gtk::FileChooserButton (M ("PREFERENCES_DIRDARKFRAMES"), Gtk::FILE_CHOOSER_ACTION_SELECT_FOLDER)); Gtk::Label *dfLab = Gtk::manage (new Gtk::Label (M ("PREFERENCES_DIRDARKFRAMES") + ":")); - hb42->pack_start (*dfLab , Gtk::PACK_SHRINK, 4 ); + hb42->pack_start (*dfLab, Gtk::PACK_SHRINK, 4 ); hb42->pack_start (*darkFrameDir, Gtk::PACK_EXPAND_WIDGET, 4); dfLabel = Gtk::manage (new Gtk::Label ("Found:")); Gtk::VBox* vbdf = Gtk::manage (new Gtk::VBox ()); vbdf->pack_start ( *hb42, Gtk::PACK_SHRINK, 4); vbdf->pack_start ( *dfLabel, Gtk::PACK_SHRINK, 4 ); fdf->add ( *vbdf ); - mvbpp->pack_start ( *fdf , Gtk::PACK_SHRINK, 4); + mvbpp->pack_start ( *fdf, Gtk::PACK_SHRINK, 4); //dfconn = darkFrameDir->signal_file_set().connect ( sigc::mem_fun(*this, &Preferences::darkFrameChanged), true); dfconn = darkFrameDir->signal_selection_changed().connect ( sigc::mem_fun (*this, &Preferences::darkFrameChanged), true); @@ -526,14 +526,14 @@ Gtk::Widget* Preferences::getProcParamsPanel () Gtk::HBox* hb43 = Gtk::manage (new Gtk::HBox ()); flatFieldDir = Gtk::manage (new Gtk::FileChooserButton (M ("PREFERENCES_FLATFIELDSDIR"), Gtk::FILE_CHOOSER_ACTION_SELECT_FOLDER)); Gtk::Label *ffLab = Gtk::manage (new Gtk::Label (M ("PREFERENCES_FLATFIELDSDIR") + ":")); - hb43->pack_start (*ffLab , Gtk::PACK_SHRINK, 4 ); + hb43->pack_start (*ffLab, Gtk::PACK_SHRINK, 4 ); hb43->pack_start (*flatFieldDir); ffLabel = Gtk::manage (new Gtk::Label ("Found:")); Gtk::VBox* vbff = Gtk::manage (new Gtk::VBox ()); vbff->pack_start ( *hb43, Gtk::PACK_SHRINK, 4); vbff->pack_start ( *ffLabel, Gtk::PACK_SHRINK, 4 ); fff->add ( *vbff ); - mvbpp->pack_start ( *fff , Gtk::PACK_SHRINK, 4); + mvbpp->pack_start ( *fff, Gtk::PACK_SHRINK, 4); //ffconn = flatFieldDir->signal_file_set().connect ( sigc::mem_fun(*this, &Preferences::flatFieldChanged), true); ffconn = flatFieldDir->signal_selection_changed().connect ( sigc::mem_fun (*this, &Preferences::flatFieldChanged), true); @@ -847,14 +847,14 @@ Gtk::Widget* Preferences::getColorManagementPanel () //------------------------- CIECAM ---------------------- - // Gtk::Label* viewlab = Gtk::manage (new Gtk::Label (M ("PREFERENCES_VIEW") + ":", Gtk::ALIGN_START)); - // setExpandAlignProperties (viewlab, false, false, Gtk::ALIGN_START, Gtk::ALIGN_CENTER); + // Gtk::Label* viewlab = Gtk::manage (new Gtk::Label (M ("PREFERENCES_VIEW") + ":", Gtk::ALIGN_START)); + // setExpandAlignProperties (viewlab, false, false, Gtk::ALIGN_START, Gtk::ALIGN_CENTER); - // view = Gtk::manage (new Gtk::ComboBoxText ()); - // setExpandAlignProperties (view, true, false, Gtk::ALIGN_FILL, Gtk::ALIGN_CENTER); + // view = Gtk::manage (new Gtk::ComboBoxText ()); +// setExpandAlignProperties (view, true, false, Gtk::ALIGN_FILL, Gtk::ALIGN_CENTER); // view->append (M("PREFERENCES_D50_MENU")); - // view->append (M ("PREFERENCES_D50")); +// view->append (M ("PREFERENCES_D50")); // view->append (M("PREFERENCES_D55")); // view->append (M("PREFERENCES_D60")); // view->append (M("PREFERENCES_D65")); @@ -1710,8 +1710,8 @@ void Preferences::storePreferences () #endif moptions.rtSettings.iccDirectory = iccDir->get_filename (); - // moptions.rtSettings.viewingdevice = view->get_active_row_number (); - // moptions.rtSettings.viewingdevicegrey = grey->get_active_row_number (); +// moptions.rtSettings.viewingdevice = view->get_active_row_number (); +// moptions.rtSettings.viewingdevicegrey = grey->get_active_row_number (); moptions.rtSettings.viewinggreySc = greySc->get_active_row_number (); // moptions.rtSettings.autocielab = cbAutocielab->get_active (); moptions.rtSettings.ciecamfloat = cbciecamfloat->get_active (); @@ -1870,8 +1870,8 @@ void Preferences::fillPreferences () iccDir->set_current_folder (moptions.rtSettings.iccDirectory); } - // view->set_active (moptions.rtSettings.viewingdevice); - // grey->set_active (moptions.rtSettings.viewingdevicegrey); +// view->set_active (moptions.rtSettings.viewingdevice); +// grey->set_active (moptions.rtSettings.viewingdevicegrey); greySc->set_active (moptions.rtSettings.viewinggreySc); dnv->set_active (moptions.rtSettings.leveldnv); dnti->set_active (moptions.rtSettings.leveldnti); @@ -2021,6 +2021,7 @@ void Preferences::fillPreferences () setc.block (true); moptions.baBehav.resize (ADDSET_PARAM_NUM); + for (size_t i = 0; i < moptions.baBehav.size(); i++) for (Gtk::TreeIter sections = behModel->children().begin(); sections != behModel->children().end(); sections++) for (Gtk::TreeIter adjs = sections->children().begin(); adjs != sections->children().end(); adjs++)