diff --git a/rtdata/languages/default b/rtdata/languages/default index 9b4ded9d6..31192d8fb 100644 --- a/rtdata/languages/default +++ b/rtdata/languages/default @@ -737,6 +737,7 @@ HISTORY_MSG_PREPROCESS_PDAFLINESFILTER;PDAF lines filter HISTORY_MSG_TM_FATTAL_ANCHOR;HDR TM - Anchor HISTORY_MSG_ICMPROFILE;Output profile type HISTORY_MSG_ICMPRIMARI;Output profile primaries +HISTORY_MSG_ICMTEMP;Output IccV4 D illuminant HISTORY_NEWSNAPSHOT;Add HISTORY_NEWSNAPSHOT_TOOLTIP;Shortcut: Alt-s HISTORY_SNAPSHOT;Snapshot @@ -1609,6 +1610,15 @@ TP_GAMMA_PRIM_WIDEG;Widegamut TP_GAMMA_PRIM_BEST;BestRGB TP_GAMMA_PRIM_BETA;BetaRGB TP_GAMMA_PRIM_BRUCE;BruceRGB +TP_GAMMA_TEMP;D illuminant (icc V4)temp +TP_GAMMA_TEMP_DEF;Default +TP_GAMMA_TEMP_41;D41 +TP_GAMMA_TEMP_50;D50 +TP_GAMMA_TEMP_55;D55 +TP_GAMMA_TEMP_60;D60 +TP_GAMMA_TEMP_65;D65 +TP_GAMMA_TEMP_80;D80 +TP_GAMMA_TEMP_TOOLTIP;Only whith generate ICC V4, you can change the D illuminant TP_GENERAL_11SCALE_TOOLTIP;The effects of this tool are only visible or only accurate at a preview scale of 1:1. TP_GRADIENT_CENTER;Center TP_GRADIENT_CENTER_X;Center X diff --git a/rtengine/iccstore.cc b/rtengine/iccstore.cc index ee6bc4814..fad3b569d 100644 --- a/rtengine/iccstore.cc +++ b/rtengine/iccstore.cc @@ -1418,9 +1418,45 @@ cmsHPROFILE rtengine::ICCStore::createGammaProfile(const procparams::ColorManage // 7 parameters for smoother curves cmsFloat64Number Parameters[7] = { ga[0], ga[1], ga[2], ga[3], ga[4], ga[5], ga[6] } ; + /* + if(icm.wprofile == "v4" && icm.wtemp != "DEF") { + if(icm.wtemp == "D41") outPr = outPr + "D41"; + else if(icm.wtemp == "D50") outPr = outPr + "D50"; + else if(icm.wtemp == "D55") outPr = outPr + "D55"; + else if(icm.wtemp == "D60") outPr = outPr + "D60"; + else if(icm.wtemp == "D65") outPr = outPr + "D65"; + else if(icm.wtemp == "D80") outPr = outPr + "D80"; + } + */ //lcmsMutex->lock(); Mutex acquired by the caller - cmsWhitePointFromTemp(&xyD, (double)temp); + double tempv4 = 5000.; + + if (icm.wprofile == "v4" && icm.wtemp != "DEF") { + if (icm.wtemp == "D41") { + tempv4 = 4100.; + } else if (icm.wtemp == "D50") { + tempv4 = 5003.; + } else if (icm.wtemp == "D55") { + tempv4 = 5500.; + } else if (icm.wtemp == "D60") { + tempv4 = 6005.; + } else if (icm.wtemp == "D65") { + tempv4 = 6504.; + } else if (icm.wtemp == "D80") { + tempv4 = 8000.; + } + + } + + if (icm.wprofile == "v4" && icm.wtemp != "DEF") { + cmsWhitePointFromTemp(&xyD, tempv4); + } else { + cmsWhitePointFromTemp(&xyD, (double)temp); + } + + + // cmsWhitePointFromTemp(&xyD, (double)temp); GammaTRC[0] = GammaTRC[1] = GammaTRC[2] = cmsBuildParametricToneCurve(nullptr, 5, Parameters); //5 = smoother than 4 cmsHPROFILE oprofdef = cmsCreateRGBProfile(&xyD, &Primaries, GammaTRC); //oprofdef become Outputprofile @@ -1520,6 +1556,7 @@ cmsHPROFILE rtengine::ICCStore::createCustomGammaOutputProfile(const procparams: cmsContext ContextID = cmsGetProfileContextID(outputProfile); // create context to modify some TAGs mlu = cmsMLUalloc(ContextID, 1); Glib::ustring outPro; + Glib::ustring outTemp; if (icm.gamma == "High_g1.3_s3.35") { gammaStr = "_High_g=1.3_s=3.35"; @@ -1537,6 +1574,24 @@ cmsHPROFILE rtengine::ICCStore::createCustomGammaOutputProfile(const procparams: gammaStr = "_g=1.8"; } else if (icm.gamma == "Lab_g3.0s9.03296") { gammaStr = "_LAB_g3.0_s9.03296"; + } + outTemp = outPr; + if (icm.wprofile == "v4" && icm.wtemp != "DEF") { + if (icm.wtemp == "D41") { + outPr = outPr + "D41"; + } else if (icm.wtemp == "D50") { + outPr = outPr + "D50"; + } else if (icm.wtemp == "D55") { + outPr = outPr + "D55"; + } else if (icm.wtemp == "D60") { + outPr = outPr + "D60"; + } else if (icm.wtemp == "D65") { + outPr = outPr + "D65"; + } else if (icm.wtemp == "D80") { + outPr = outPr + "D80"; + } + // printf("outpr=%s \n",outPr.c_str()); + } // create description with gamma + slope + primaries @@ -1548,33 +1603,33 @@ 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"; - } else if (icm.wprofile == "v2" || icm.wprofile == "none" ) { + } else if (icm.wprofile == "v2" || icm.wprofile == "none") { outPro = outPr + "_V2_" + std::to_string((float)icm.gampos) + " " + std::to_string((float)icm.slpos) + ".icc"; } gammaWs.precision(2); - gammaWs << outPr << " g=" << (float)icm.gampos << " s=" << (float)icm.slpos; + gammaWs << outTemp << " g=" << (float)icm.gampos << " s=" << (float)icm.slpos; - // cmsMLUsetWide(mlu, "en", "US", gammaWs.str().c_str()); + // cmsMLUsetWide(mlu, "en", "US", gammaWs.str().c_str()); } else { if (icm.wprofile == "v4") { outPro = outPr + "_V4_" + gammaStr + ".icc"; - } else if (icm.wprofile == "v2" || icm.wprofile == "none" ) { + } else if (icm.wprofile == "v2" || icm.wprofile == "none") { outPro = outPr + "_V2_" + gammaStr + ".icc"; } + gammaWs << outTemp << gammaStr; - gammaWs << outPro.c_str() ; - // cmsMLUsetWide(mlu, "en", "US", gammaWs.str().c_str()); + // gammaWs << outPro.c_str() ; + // cmsMLUsetWide(mlu, "en", "US", gammaWs.str().c_str()); } - cmsMLUsetWide(mlu, "en", "US", gammaWs.str().c_str()); cmsMLU *copyright = cmsMLUalloc(NULL, 1); @@ -1706,8 +1761,32 @@ cmsHPROFILE rtengine::ICCStore::createCustomGammaOutputProfile(const procparams: {p[2], p[3], 1.0}, // green {p[4], p[5], 1.0} // blue }; + double tempv4 = 5000.; + + if (icm.wprofile == "v4" && icm.wtemp != "DEF") { + if (icm.wtemp == "D41") { + tempv4 = 4100.; + } else if (icm.wtemp == "D50") { + tempv4 = 5003.; + } else if (icm.wtemp == "D55") { + tempv4 = 5500.; + } else if (icm.wtemp == "D60") { + tempv4 = 6005.; + } else if (icm.wtemp == "D65") { + tempv4 = 6504.; + } else if (icm.wtemp == "D80") { + tempv4 = 8000.; + } + printf("tempv4=%f \n", tempv4); + + } + + if (icm.wprofile == "v4" && icm.wtemp != "DEF") { + cmsWhitePointFromTemp(&xyD, tempv4); + } else { + cmsWhitePointFromTemp(&xyD, (double)temp); + } - cmsWhitePointFromTemp(&xyD, (double)temp); cmsToneCurve* GammaTRC[3]; diff --git a/rtengine/procparams.cc b/rtengine/procparams.cc index e2ca3bcf5..fa8b3a1d7 100644 --- a/rtengine/procparams.cc +++ b/rtengine/procparams.cc @@ -1961,6 +1961,7 @@ ColorManagementParams::ColorManagementParams() : slpos(12.92310), wprimari("sRGB"), wprofile("none"), + wtemp("DEF"), freegamma(false) { } @@ -1983,6 +1984,7 @@ bool ColorManagementParams::operator ==(const ColorManagementParams& other) cons && slpos == other.slpos && wprimari == other.wprimari && wprofile == other.wprofile + && wtemp == other.wtemp && freegamma == other.freegamma; } @@ -3200,6 +3202,7 @@ int ProcParams::save(const Glib::ustring& fname, const Glib::ustring& fname2, bo saveToKeyfile(!pedited || pedited->icm.gampos, "Color Management", "GammaValue", icm.gampos, keyFile); saveToKeyfile(!pedited || pedited->icm.slpos, "Color Management", "GammaSlope", icm.slpos, keyFile); saveToKeyfile(!pedited || pedited->icm.wprimari, "Color Management", "GammaPrimari", icm.wprimari, keyFile); + saveToKeyfile(!pedited || pedited->icm.wtemp, "Color Management", "GammaTemp", icm.wtemp, keyFile); saveToKeyfile(!pedited || pedited->icm.wprofile, "Color Management", "GammaProfile", icm.wprofile, keyFile); // Wavelet @@ -4242,6 +4245,7 @@ int ProcParams::load(const Glib::ustring& fname, ParamsEdited* pedited) assignFromKeyfile(keyFile, "Color Management", "GammaSlope", pedited, icm.slpos, pedited->icm.slpos); assignFromKeyfile(keyFile, "Color Management", "GammaPrimari", pedited, icm.wprimari, pedited->icm.wprimari); assignFromKeyfile(keyFile, "Color Management", "GammaProfile", pedited, icm.wprofile, pedited->icm.wprofile); + assignFromKeyfile(keyFile, "Color Management", "GammaTemp", pedited, icm.wtemp, pedited->icm.wtemp); } if (keyFile.has_group("Wavelet")) { diff --git a/rtengine/procparams.h b/rtengine/procparams.h index de8091169..8d3d6d10b 100644 --- a/rtengine/procparams.h +++ b/rtengine/procparams.h @@ -1023,6 +1023,7 @@ struct ColorManagementParams { double slpos; Glib::ustring wprimari; Glib::ustring wprofile; + Glib::ustring wtemp; static const Glib::ustring NoICMString; bool freegamma; diff --git a/rtengine/refreshmap.h b/rtengine/refreshmap.h index 88092adfc..b9ccc2b65 100644 --- a/rtengine/refreshmap.h +++ b/rtengine/refreshmap.h @@ -66,7 +66,7 @@ #define DEFRINGE (M_LUMINANCE|M_COLOR) #define DIRPYRDENOISE (M_LUMINANCE|M_COLOR) #define DIRPYREQUALIZER (M_LUMINANCE|M_COLOR) -#define GAMMA M_MONITOR +#define GAMMA M_VOID //M_MONITOR #define CROP M_CROP #define RESIZE M_VOID #define EXIF M_VOID diff --git a/rtengine/simpleprocess.cc b/rtengine/simpleprocess.cc index df4435325..7b90afc1a 100644 --- a/rtengine/simpleprocess.cc +++ b/rtengine/simpleprocess.cc @@ -1253,7 +1253,7 @@ private: bool useLCMS = false; bool bwonly = params.blackwhite.enabled && !params.colorToning.enabled && !autili && !butili ; - if (params.icm.gamma != "Free" || params.icm.freegamma) { // if select gamma output between BT709, sRGB, linear, low, high, 2.2 , 1.8 + if (params.icm.freegamma /*!= "Free" || params.icm.freegamma*/) { GammaValues ga; // if(params.blackwhite.enabled) params.toneCurve.hrenabled=false; diff --git a/rtgui/icmpanel.cc b/rtgui/icmpanel.cc index b80161603..68bdc434f 100644 --- a/rtgui/icmpanel.cc +++ b/rtgui/icmpanel.cc @@ -36,6 +36,7 @@ ICMPanel::ICMPanel() : FoldableToolPanel(this, "icm", M("TP_ICM_LABEL")), iuncha auto m = ProcEventMapper::getInstance(); EvICMprimariMethod = m->newEvent(GAMMA, "HISTORY_MSG_ICMPRIMARI"); EvICMprofileMethod = m->newEvent(GAMMA, "HISTORY_MSG_ICMPROFILE"); + EvICMtempMethod = m->newEvent(GAMMA, "HISTORY_MSG_ICMTEMP"); isBatchMode = lastToneCurve = lastApplyLookTable = lastApplyBaselineExposureOffset = lastApplyHueSatMap = lastgamfree = false; @@ -269,6 +270,7 @@ ICMPanel::ICMPanel() : FoldableToolPanel(this, "icm", M("TP_ICM_LABEL")), iuncha wprimari->append(M("TP_GAMMA_PRIM_BETA")); wprimari->append(M("TP_GAMMA_PRIM_BRUCE")); wprimari->set_active(5); + //sliders gampos and slpos fgVBox->pack_start(*gaHBox, Gtk::PACK_EXPAND_WIDGET); @@ -307,6 +309,25 @@ ICMPanel::ICMPanel() : FoldableToolPanel(this, "icm", M("TP_ICM_LABEL")), iuncha wprofile->set_active(0); + + //temperature + tempHBox = Gtk::manage(new Gtk::HBox()); + + Gtk::Label* templab = Gtk::manage(new Gtk::Label(M("TP_GAMMA_TEMP") + ":")); + + tempHBox->pack_start(*templab, Gtk::PACK_SHRINK); + wtemp = Gtk::manage(new MyComboBoxText()); + tempHBox->pack_start(*wtemp, Gtk::PACK_EXPAND_WIDGET); + fgVBox->pack_start(*tempHBox, Gtk::PACK_EXPAND_WIDGET); + wtemp->append(M("TP_GAMMA_TEMP_DEF")); + wtemp->append(M("TP_GAMMA_TEMP_41")); + wtemp->append(M("TP_GAMMA_TEMP_50")); + wtemp->append(M("TP_GAMMA_TEMP_55")); + wtemp->append(M("TP_GAMMA_TEMP_60")); + wtemp->append(M("TP_GAMMA_TEMP_65")); + wtemp->append(M("TP_GAMMA_TEMP_80")); + wtemp->set_active(0); + wtemp->set_tooltip_text(M("TP_GAMMA_TEMP_TOOLTIP")); fgFrame->add(*fgVBox); oVBox->pack_start(*fgFrame, Gtk::PACK_EXPAND_WIDGET); @@ -357,6 +378,7 @@ ICMPanel::ICMPanel() : FoldableToolPanel(this, "icm", M("TP_ICM_LABEL")), iuncha dcpillconn = dcpIll->signal_changed().connect(sigc::mem_fun(*this, &ICMPanel::dcpIlluminantChanged)); wprimariconn = wprimari->signal_changed().connect(sigc::mem_fun(*this, &ICMPanel::wprimariChanged)); wprofileconn = wprofile->signal_changed().connect(sigc::mem_fun(*this, &ICMPanel::wprofileChanged)); + wtempconn = wtemp->signal_changed().connect(sigc::mem_fun(*this, &ICMPanel::wtempChanged)); obpcconn = obpc->signal_toggled().connect(sigc::mem_fun(*this, &ICMPanel::oBPCChanged)); gamcsconn = freegamma->signal_toggled().connect(sigc::mem_fun(*this, &ICMPanel::GamChanged)); @@ -547,6 +569,7 @@ void ICMPanel::read(const ProcParams* pp, const ParamsEdited* pedited) ConnectionBlocker dcpillconn_(dcpillconn); ConnectionBlocker wprimariconn_(wprimariconn); ConnectionBlocker wprofileconn_(wprofileconn); + ConnectionBlocker wtempconn_(wtempconn); if (pp->icm.input.substr(0, 5) != "file:" && !ipDialog->get_filename().empty()) { ipDialog->set_filename(pp->icm.input); @@ -582,7 +605,6 @@ void ICMPanel::read(const ProcParams* pp, const ParamsEdited* pedited) wnames->set_active_text(pp->icm.working); wgamma->set_active_text(pp->icm.gamma); - gpChanged(); if (pp->icm.wprimari == "acesp0") { @@ -607,6 +629,22 @@ void ICMPanel::read(const ProcParams* pp, const ParamsEdited* pedited) wprimari->set_active(9); } + if (pp->icm.wtemp == "DEF") { + wtemp->set_active(0); + } else if (pp->icm.wtemp == "D41") { + wtemp->set_active(1); + } else if (pp->icm.wtemp == "D50") { + wtemp->set_active(2); + } else if (pp->icm.wtemp == "D55") { + wtemp->set_active(3); + } else if (pp->icm.wtemp == "D60") { + wtemp->set_active(4); + } else if (pp->icm.wtemp == "D65") { + wtemp->set_active(5); + } else if (pp->icm.wtemp == "D80") { + wtemp->set_active(6); + } + if (pp->icm.wprofile == "none") { wprofile->set_active(0); @@ -616,7 +654,9 @@ void ICMPanel::read(const ProcParams* pp, const ParamsEdited* pedited) wprofile->set_active(2); } - + gpChanged(); + wprofileChanged(); + wtempChanged(); if (pp->icm.output == ColorManagementParams::NoICMString) { onames->set_active_text(M("TP_ICM_NOICM")); @@ -653,6 +693,10 @@ void ICMPanel::read(const ProcParams* pp, const ParamsEdited* pedited) updateRenderingIntent(pp->icm.output); wprimari->set_sensitive(pp->icm.freegamma); wprofile->set_sensitive(pp->icm.freegamma); + if(wprofile->get_active_row_number() == 2) {wtemp->set_sensitive(pp->icm.freegamma);} + else {wtemp->set_sensitive(false);} + // wtemp->set_sensitive(pp->icm.freegamma); + } gampos->setValue(pp->icm.gampos); @@ -695,6 +739,10 @@ void ICMPanel::read(const ProcParams* pp, const ParamsEdited* pedited) wprofile->set_active_text(M("GENERAL_UNCHANGED")); } + if (!pedited->icm.wtemp) { + wtemp->set_active_text(M("GENERAL_UNCHANGED")); + } + gampos->setEditedState(pedited->icm.gampos ? Edited : UnEdited); slpos->setEditedState(pedited->icm.slpos ? Edited : UnEdited); @@ -728,6 +776,7 @@ void ICMPanel::write(ProcParams* pp, ParamsEdited* pedited) 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.wtemp = wtemp->get_active_text(); if (onames->get_active_text() == M("TP_ICM_NOICM")) { pp->icm.output = ColorManagementParams::NoICMString; @@ -773,6 +822,21 @@ void ICMPanel::write(ProcParams* pp, ParamsEdited* pedited) pp->icm.wprimari = "BruceRGB"; } + if (wtemp->get_active_row_number() == 0) { + pp->icm.wtemp = "DEF"; + } else if (wtemp->get_active_row_number() == 1) { + pp->icm.wtemp = "D41"; + } else if (wtemp->get_active_row_number() == 2) { + pp->icm.wtemp = "D50"; + } else if (wtemp->get_active_row_number() == 3) { + pp->icm.wtemp = "D55"; + } else if (wprimari->get_active_row_number() == 4) { + pp->icm.wtemp = "D60"; + } else if (wtemp->get_active_row_number() == 5) { + pp->icm.wtemp = "D65"; + } else if (wtemp->get_active_row_number() == 6) { + pp->icm.wtemp = "D80"; + } pp->icm.freegamma = freegamma->get_active(); pp->icm.toneCurve = ckbToneCurve->get_active(); @@ -800,6 +864,7 @@ void ICMPanel::write(ProcParams* pp, ParamsEdited* pedited) pedited->icm.slpos = slpos->getEditedState(); pedited->icm.wprimari = wprimari->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"); } } @@ -840,7 +905,8 @@ void ICMPanel::adjusterChanged(Adjuster* a, double newval) void ICMPanel::wpChanged() { - + if(wprofile->get_active_row_number() == 2) {wtemp->set_sensitive(true);} + else {wtemp->set_sensitive(false);} if (listener) { listener->panelChanged(EvWProfile, wnames->get_active_text()); } @@ -854,11 +920,24 @@ void ICMPanel::wprimariChanged() } } +void ICMPanel::wtempChanged() +{ + if(wprofile->get_active_row_number() == 2){wtemp->set_sensitive(true);} + else {wtemp->set_sensitive(false);} + + if (listener) { + listener->panelChanged(EvICMtempMethod, wtemp->get_active_text()); + } +} + void ICMPanel::wprofileChanged() { + if(wprofile->get_active_row_number() == 2){wtemp->set_sensitive(true);} + else {wtemp->set_sensitive(false);} if (listener) { listener->panelChanged(EvICMprofileMethod, wprofile->get_active_text()); + } } @@ -1030,6 +1109,10 @@ void ICMPanel::ipChanged() void ICMPanel::GamChanged() { + + if(wprofile->get_active_row_number() == 2) {wtemp->set_sensitive(true);} + else {wtemp->set_sensitive(false);} + if (multiImage) { if (freegamma->get_inconsistent()) { freegamma->set_inconsistent(false); @@ -1056,9 +1139,12 @@ void ICMPanel::GamChanged() slpos->set_sensitive(true); wprimari->set_sensitive(true); wprofile->set_sensitive(true); + //wtemp->set_sensitive(true); + if(wprofile->get_active_row_number() == 2) wtemp->set_sensitive(true); priHBox->set_sensitive(true); gaHBox->set_sensitive(true); profHBox->set_sensitive(true); + tempHBox->set_sensitive(true); } } else { listener->panelChanged(EvGAMFREE, M("GENERAL_DISABLED")); @@ -1070,9 +1156,12 @@ void ICMPanel::GamChanged() slpos->set_sensitive(false); wprimari->set_sensitive(false); wprofile->set_sensitive(false); + if(wprofile->get_active_row_number() != 2) wtemp->set_sensitive(false); + //wtemp->set_sensitive(false); priHBox->set_sensitive(false); gaHBox->set_sensitive(false); profHBox->set_sensitive(false); + tempHBox->set_sensitive(false); } } @@ -1252,6 +1341,7 @@ void ICMPanel::setBatchMode(bool batchMode) wgamma->append(M("GENERAL_UNCHANGED")); wprimari->append(M("GENERAL_UNCHANGED")); wprofile->append(M("GENERAL_UNCHANGED")); + wtemp->append(M("GENERAL_UNCHANGED")); dcpIll->append(M("GENERAL_UNCHANGED")); gampos->showEditedCB(); slpos->showEditedCB(); diff --git a/rtgui/icmpanel.h b/rtgui/icmpanel.h index 294a999f6..ef358b3e4 100644 --- a/rtgui/icmpanel.h +++ b/rtgui/icmpanel.h @@ -61,12 +61,14 @@ protected: private: rtengine::ProcEvent EvICMprimariMethod; rtengine::ProcEvent EvICMprofileMethod; + rtengine::ProcEvent EvICMtempMethod; Gtk::VBox * iVBox; - Gtk::HBox* priHBox; - Gtk::HBox* gaHBox; - Gtk::HBox* profHBox; - + Gtk::HBox* priHBox; + Gtk::HBox* gaHBox; + Gtk::HBox* profHBox; + Gtk::HBox* tempHBox; + Gtk::CheckButton* obpc; Gtk::CheckButton* freegamma; Gtk::RadioButton* inone; @@ -90,6 +92,8 @@ private: sigc::connection wprimariconn; MyComboBoxText* wprofile; sigc::connection wprofileconn; + MyComboBoxText* wtemp; + sigc::connection wtempconn; MyComboBoxText* onames; sigc::connection onamesconn; @@ -121,6 +125,7 @@ public: void wpChanged(); void wprimariChanged(); void wprofileChanged(); + void wtempChanged(); void opChanged(); void oiChanged(int n); void oBPCChanged(); @@ -133,7 +138,7 @@ public: void applyLookTableChanged(); void applyBaselineExposureOffsetChanged(); void applyHueSatMapChanged(); - void TRCChanged (double gamm, double slo); + void TRCChanged(double gamm, double slo); void setRawMeta(bool raw, const rtengine::FramesData* pMeta); void saveReferencePressed(); diff --git a/rtgui/paramsedited.cc b/rtgui/paramsedited.cc index 01099f3a4..f02b1fd8e 100644 --- a/rtgui/paramsedited.cc +++ b/rtgui/paramsedited.cc @@ -391,6 +391,7 @@ void ParamsEdited::set(bool v) icm.slpos = v; icm.wprimari = v; icm.wprofile = v; + icm.wtemp = v; raw.bayersensor.method = v; raw.bayersensor.imageNum = v; raw.bayersensor.ccSteps = v; @@ -957,6 +958,7 @@ void ParamsEdited::initFrom(const std::vector& icm.slpos = icm.slpos && p.icm.slpos == other.icm.slpos; icm.wprimari = icm.wprimari && p.icm.wprimari == other.icm.wprimari; icm.wprofile = icm.wprofile && p.icm.wprofile == other.icm.wprofile; + icm.wtemp = icm.wtemp && p.icm.wtemp == other.icm.wtemp; raw.bayersensor.method = raw.bayersensor.method && p.raw.bayersensor.method == other.raw.bayersensor.method; raw.bayersensor.imageNum = raw.bayersensor.imageNum && p.raw.bayersensor.imageNum == other.raw.bayersensor.imageNum; raw.bayersensor.ccSteps = raw.bayersensor.ccSteps && p.raw.bayersensor.ccSteps == other.raw.bayersensor.ccSteps; @@ -2488,6 +2490,10 @@ void ParamsEdited::combine(rtengine::procparams::ProcParams& toEdit, const rteng toEdit.icm.wprofile = mods.icm.wprofile; } + if (icm.wtemp) { + toEdit.icm.wtemp = mods.icm.wtemp; + } + if (icm.freegamma) { toEdit.icm.freegamma = mods.icm.freegamma; } diff --git a/rtgui/paramsedited.h b/rtgui/paramsedited.h index bb6ffc944..5dcf987cc 100644 --- a/rtgui/paramsedited.h +++ b/rtgui/paramsedited.h @@ -591,6 +591,7 @@ public: bool freegamma; bool wprimari; bool wprofile; + bool wtemp; }; class WaveletParamsEdited {