From 4d46e618bb4cac9cbedcf56d321ef335396953af Mon Sep 17 00:00:00 2001 From: heckflosse Date: Tue, 23 Oct 2018 21:03:23 +0200 Subject: [PATCH] Calculate dual demosaic auto contrast threshold when saving file, #4866 --- rtengine/simpleprocess.cc | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/rtengine/simpleprocess.cc b/rtengine/simpleprocess.cc index fbee20f44..06e2b13bf 100644 --- a/rtengine/simpleprocess.cc +++ b/rtengine/simpleprocess.cc @@ -209,8 +209,10 @@ private: if (pl) { pl->setProgress (0.20); } - double contrastThresholdDummy; - imgsrc->demosaic (params.raw, false, contrastThresholdDummy); + bool autoContrast = imgsrc->getSensorType() == ST_BAYER ? params.raw.bayersensor.dualDemosaicAutoContrast : params.raw.xtranssensor.dualDemosaicAutoContrast; + double contrastThreshold = imgsrc->getSensorType() == ST_BAYER ? params.raw.bayersensor.dualDemosaicContrast : params.raw.xtranssensor.dualDemosaicContrast; + + imgsrc->demosaic (params.raw, autoContrast, contrastThreshold); if (pl) {