diff --git a/rtengine/filmnegativeproc.cc b/rtengine/filmnegativeproc.cc index f5a231c05..eed10fdc4 100644 --- a/rtengine/filmnegativeproc.cc +++ b/rtengine/filmnegativeproc.cc @@ -151,9 +151,9 @@ bool rtengine::RawImageSource::getFilmNegativeExponents(Coord2D spotA, Coord2D s // compared to the ratio in the reference channel (green) for (int ch = 0; ch < 3; ++ch) { if (ch == 1) { - newExps[ch] = 2.f; // Green is the reference channel + newExps[ch] = 1.f; // Green is the reference channel } else { - newExps[ch] = CLAMP(2.f * logBase(clearVals[ch] / denseVals[ch], denseGreenRatio), 0.3f, 6.f); + newExps[ch] = CLAMP(logBase(clearVals[ch] / denseVals[ch], denseGreenRatio), 0.3f, 6.f); } } diff --git a/rtgui/filmnegative.cc b/rtgui/filmnegative.cc index 36f2e7c34..d84c1bd0a 100644 --- a/rtgui/filmnegative.cc +++ b/rtgui/filmnegative.cc @@ -273,11 +273,12 @@ bool FilmNegative::button1Pressed(int modifierKey) std::array newExps; if (fnp->getFilmNegativeExponents(refSpotCoords[0], refSpotCoords[1], newExps)) { disableListener(); - redExp->setValue(newExps[0]); - greenExp->setValue(newExps[1]); - blueExp->setValue(newExps[2]); - redRatio = redExp->getValue() / greenExp->getValue(); - blueRatio = blueExp->getValue() / greenExp->getValue(); + // Leaving green exponent unchanged, setting red and blue exponents based on + // the ratios between newly calculated exponents. + redRatio = newExps[0] / newExps[1]; + blueRatio = newExps[2] / newExps[1]; + redExp->setValue(greenExp->getValue() * redRatio); + blueExp->setValue(greenExp->getValue() * blueRatio); enableListener(); if (listener && getEnabled()) {