From ba2985a44cbefdca76e3ff144fba66844470ff52 Mon Sep 17 00:00:00 2001 From: Desmis Date: Sun, 29 Aug 2021 07:39:01 +0200 Subject: [PATCH] Enable checkbutton preferences - ciecam artifacts (#6347) --- rtdata/languages/default | 2 ++ rtengine/procparams.cc | 2 +- rtgui/options.cc | 12 ++++++++---- rtgui/preferences.cc | 17 +++++++++++++++++ rtgui/preferences.h | 1 + 5 files changed, 29 insertions(+), 5 deletions(-) diff --git a/rtdata/languages/default b/rtdata/languages/default index e13504f95..d12360bba 100644 --- a/rtdata/languages/default +++ b/rtdata/languages/default @@ -1741,6 +1741,8 @@ PREFERENCES_CHUNKSIZE_RAW_CA;Raw CA correction PREFERENCES_CHUNKSIZE_RAW_RCD;RCD demosaic PREFERENCES_CHUNKSIZE_RAW_XT;Xtrans demosaic PREFERENCES_CHUNKSIZE_RGB;RGB processing +PREFERENCES_CIE;Ciecam +PREFERENCES_CIEARTIF;Avoid artifacts PREFERENCES_CLIPPINGIND;Clipping Indication PREFERENCES_CLUTSCACHE;HaldCLUT Cache PREFERENCES_CLUTSCACHE_LABEL;Maximum number of cached CLUTs diff --git a/rtengine/procparams.cc b/rtengine/procparams.cc index 80c25a5a3..e737eb2b5 100644 --- a/rtengine/procparams.cc +++ b/rtengine/procparams.cc @@ -1430,7 +1430,7 @@ ColorAppearanceParams::ColorAppearanceParams() : curveMode2(TcMode::LIGHT), curveMode3(CtcMode::CHROMA), complexmethod("normal"), - modelmethod("02"), + modelmethod("16"), catmethod("clas"), surround("Average"), surrsrc("Average"), diff --git a/rtgui/options.cc b/rtgui/options.cc index 4e6beb7f4..70b0fa010 100644 --- a/rtgui/options.cc +++ b/rtgui/options.cc @@ -590,6 +590,7 @@ void Options::setDefaults() rtSettings.monitorProfile = Glib::ustring(); rtSettings.monitorIntent = rtengine::RI_RELATIVE; rtSettings.monitorBPC = true; + rtSettings.autocielab = false; rtSettings.autoMonitorProfile = false; rtSettings.adobe = "RTv2_Medium"; // put the name of yours profiles (here windows) rtSettings.prophoto = "RTv2_Large"; // these names appear in the menu "output profile" @@ -636,7 +637,7 @@ void Options::setDefaults() rtSettings.protectred = 60; rtSettings.protectredh = 0.3; rtSettings.CRI_color = 0; - rtSettings.autocielab = true; + // rtSettings.autocielab = true; rtSettings.denoiselabgamma = 2; rtSettings.HistogramWorking = false; @@ -1564,9 +1565,6 @@ void Options::readFromFile(Glib::ustring fname) rtSettings.autoMonitorProfile = keyFile.get_boolean("Color Management", "AutoMonitorProfile"); } - if (keyFile.has_key("Color Management", "Autocielab")) { - rtSettings.autocielab = keyFile.get_boolean("Color Management", "Autocielab"); - } if (keyFile.has_key("Color Management", "RGBcurvesLumamode_Gamut")) { rtSettings.rgbcurveslumamode_gamut = keyFile.get_boolean("Color Management", "RGBcurvesLumamode_Gamut"); @@ -1580,6 +1578,10 @@ void Options::readFromFile(Glib::ustring fname) rtSettings.monitorBPC = keyFile.get_boolean("Color Management", "MonitorBPC"); } + if (keyFile.has_key("Color Management", "Autocielab")) { + rtSettings.autocielab = keyFile.get_boolean("Color Management", "Autocielab"); + } + if (keyFile.has_key("Color Management", "CRI")) { rtSettings.CRI_color = keyFile.get_integer("Color Management", "CRI"); } @@ -2353,6 +2355,8 @@ void 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", "greySc", rtSettings.viewinggreySc); diff --git a/rtgui/preferences.cc b/rtgui/preferences.cc index 3a7534ca9..c6c2eb61b 100644 --- a/rtgui/preferences.cc +++ b/rtgui/preferences.cc @@ -779,6 +779,7 @@ Gtk::Widget* Preferences::getColorManPanel () vbColorMan->pack_start (*iccdgrid, Gtk::PACK_SHRINK); + //------------------------- MONITOR ---------------------- Gtk::Frame* fmonitor = Gtk::manage(new Gtk::Frame(M("PREFERENCES_MONITOR"))); @@ -897,6 +898,19 @@ Gtk::Widget* Preferences::getColorManPanel () fprinter->add(*gprinter); vbColorMan->pack_start (*fprinter, Gtk::PACK_SHRINK); + + //-------------CIECAM + Gtk::Frame* fcie = Gtk::manage(new Gtk::Frame(M("PREFERENCES_CIE"))); + Gtk::Grid* gcie = Gtk::manage(new Gtk::Grid()); + gcie->set_column_spacing(4); + mcie = Gtk::manage(new Gtk::CheckButton(M("PREFERENCES_CIEARTIF"))); + setExpandAlignProperties(mcie, false, false, Gtk::ALIGN_START, Gtk::ALIGN_CENTER); + mcie->set_active(true); + int rowc = 0; + gcie->attach(*mcie, 0, rowc, 1, 1); + fcie->add(*gcie); + + vbColorMan->pack_start (*fcie, Gtk::PACK_SHRINK); swColorMan->add(*vbColorMan); return swColorMan; } @@ -1830,6 +1844,8 @@ void Preferences::storePreferences() moptions.rtSettings.monitorBPC = monBPC->get_active(); moptions.rtSettings.autoMonitorProfile = cbAutoMonProfile->get_active(); + moptions.rtSettings.autocielab = mcie->get_active(); + #endif moptions.rtSettings.iccDirectory = iccDir->get_filename(); @@ -1984,6 +2000,7 @@ void Preferences::fillPreferences() } monBPC->set_active(moptions.rtSettings.monitorBPC); + mcie->set_active(moptions.rtSettings.autocielab); cbAutoMonProfile->set_active(moptions.rtSettings.autoMonitorProfile); #endif diff --git a/rtgui/preferences.h b/rtgui/preferences.h index d5e888251..dfe1e008d 100644 --- a/rtgui/preferences.h +++ b/rtgui/preferences.h @@ -125,6 +125,7 @@ class Preferences final : Gtk::CheckButton* prtBPC; Gtk::ComboBoxText* monProfile; Gtk::ComboBoxText* monIntent; + Gtk::CheckButton* mcie; Gtk::CheckButton* monBPC; Gtk::CheckButton* cbAutoMonProfile; //Gtk::CheckButton* cbAutocielab;