From d2980caba54ab56acdab08ed351861162797def3 Mon Sep 17 00:00:00 2001 From: ffsup2 Date: Sun, 12 Feb 2012 21:23:27 +0100 Subject: [PATCH] Fix for Auto White Balance when photo is in queue (rawData was null) Thanks to marco42 --- rtengine/simpleprocess.cc | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/rtengine/simpleprocess.cc b/rtengine/simpleprocess.cc index 83e863664..403e7302e 100644 --- a/rtengine/simpleprocess.cc +++ b/rtengine/simpleprocess.cc @@ -94,13 +94,6 @@ IImage16* processImage (ProcessingJob* pjob, int& errorCode, ProgressListener* p ImProcFunctions ipf (¶ms, true); - // set the color temperature - ColorTemp currWB = ColorTemp (params.wb.temperature, params.wb.green, params.wb.method); - if (params.wb.method=="Camera") - currWB = imgsrc->getWB (); - else if (params.wb.method=="Auto") - currWB = imgsrc->getAutoWB (); - PreviewProps pp (0, 0, fw, fh, 1); imgsrc->preprocess( params.raw); if (pl) pl->setProgress (0.20); @@ -108,6 +101,12 @@ IImage16* processImage (ProcessingJob* pjob, int& errorCode, ProgressListener* p if (pl) pl->setProgress (0.30); imgsrc->HLRecovery_Global( params.hlrecovery ); if (pl) pl->setProgress (0.40); + // set the color temperature + ColorTemp currWB = ColorTemp (params.wb.temperature, params.wb.green, params.wb.method); + if (params.wb.method=="Camera") + currWB = imgsrc->getWB (); + else if (params.wb.method=="Auto") + currWB = imgsrc->getAutoWB (); Imagefloat* baseImg = new Imagefloat (fw, fh); imgsrc->getImage (currWB, tr, baseImg, pp, params.hlrecovery, params.icm, params.raw); if (pl) pl->setProgress (0.45);