From 4e09fd4f212efd3e8b0606302745beb1ef42d066 Mon Sep 17 00:00:00 2001 From: rom9 <4711834+rom9@users.noreply.github.com> Date: Fri, 28 Jun 2019 21:29:06 +0200 Subject: [PATCH] Changed master exponent default from 2.0 to 1.5; it was too large for high-contrast negatives. Set all sliders as log-scale, centered at 1.0, so that reasonable values can be fine-tuned more easily. --- rtengine/filmnegativeproc.cc | 2 +- rtengine/procparams.cc | 6 +++--- rtgui/filmnegative.cc | 15 ++++++--------- 3 files changed, 10 insertions(+), 13 deletions(-) diff --git a/rtengine/filmnegativeproc.cc b/rtengine/filmnegativeproc.cc index 4abe32b86..f3cca1245 100644 --- a/rtengine/filmnegativeproc.cc +++ b/rtengine/filmnegativeproc.cc @@ -150,7 +150,7 @@ bool rtengine::RawImageSource::getFilmNegativeExponents(Coord2D spotA, Coord2D s if (ch == 1) { newExps[ch] = 1.f; // Green is the reference channel } else { - newExps[ch] = CLAMP(logBase(clearVals[ch] / denseVals[ch], denseGreenRatio), 0.3f, 6.f); + newExps[ch] = CLAMP(logBase(clearVals[ch] / denseVals[ch], denseGreenRatio), 0.3f, 4.f); } } diff --git a/rtengine/procparams.cc b/rtengine/procparams.cc index 4ed97f767..b35faca94 100644 --- a/rtengine/procparams.cc +++ b/rtengine/procparams.cc @@ -2736,9 +2736,9 @@ bool MetaDataParams::operator!=(const MetaDataParams &other) const FilmNegativeParams::FilmNegativeParams() : enabled(false), - redExp(2.72), - greenExp(2.0), - blueExp(1.72) + redExp(2.04), + greenExp(1.5), + blueExp(1.29) { } diff --git a/rtgui/filmnegative.cc b/rtgui/filmnegative.cc index 129af3034..0e6ec9e8f 100644 --- a/rtgui/filmnegative.cc +++ b/rtgui/filmnegative.cc @@ -30,14 +30,11 @@ namespace { -Adjuster* createExponentAdjuster(AdjusterListener* listener, const Glib::ustring& label, double minV, double maxV, double defaultVal, bool log) +Adjuster* createExponentAdjuster(AdjusterListener* listener, const Glib::ustring& label, double minV, double maxV, double defaultVal) { - Adjuster* const adj = Gtk::manage(new Adjuster(label, minV, maxV, 0.001, defaultVal)); // exponent + Adjuster* const adj = Gtk::manage(new Adjuster(label, minV, maxV, 0.001, defaultVal)); adj->setAdjusterListener(listener); - - if (log) { - adj->setLogScale(10, minV, false); - } + adj->setLogScale(6, 1, true); if (adj->delay < options.adjusterMaxDelay) { adj->delay = options.adjusterMaxDelay; @@ -55,9 +52,9 @@ FilmNegative::FilmNegative() : evFilmNegativeExponents(ProcEventMapper::getInstance()->newEvent(FIRST, "HISTORY_MSG_FILMNEGATIVE_EXPONENTS")), evFilmNegativeEnabled(ProcEventMapper::getInstance()->newEvent(FIRST, "HISTORY_MSG_FILMNEGATIVE_ENABLED")), fnp(nullptr), - greenExp(createExponentAdjuster(this, M("TP_FILMNEGATIVE_GREEN"), 0.3, 4, 2.0, false)), - redRatio(createExponentAdjuster(this, M("TP_FILMNEGATIVE_RED"), 0.3, 3, 1.36, true)), - blueRatio(createExponentAdjuster(this, M("TP_FILMNEGATIVE_BLUE"), 0.3, 3, 0.86, true)), + greenExp(createExponentAdjuster(this, M("TP_FILMNEGATIVE_GREEN"), 0.3, 4, 1.5)), + redRatio(createExponentAdjuster(this, M("TP_FILMNEGATIVE_RED"), 0.3, 3, 1.36)), + blueRatio(createExponentAdjuster(this, M("TP_FILMNEGATIVE_BLUE"), 0.3, 3, 0.86)), spotgrid(Gtk::manage(new Gtk::Grid())), spotbutton(Gtk::manage(new Gtk::ToggleButton(M("TP_FILMNEGATIVE_PICK")))) {