diff --git a/rtengine/rtthumbnail.cc b/rtengine/rtthumbnail.cc index 2e3fdc09b..ebd0e121a 100644 --- a/rtengine/rtthumbnail.cc +++ b/rtengine/rtthumbnail.cc @@ -527,6 +527,7 @@ Thumbnail::~Thumbnail () { cmsCloseProfile(camProfile); } +// Simple processing of RAW internal JPGs IImage8* Thumbnail::quickProcessImage (const procparams::ProcParams& params, int rheight, TypeInterpolation interp, double& myscale) { int rwidth; @@ -560,6 +561,7 @@ IImage8* Thumbnail::quickProcessImage (const procparams::ProcParams& params, int return img8; } +// Full thumbnail processing, second stage if complete profile exists IImage8* Thumbnail::processImage (const procparams::ProcParams& params, int rheight, TypeInterpolation interp, double& myscale) { // compute WB multipliers @@ -698,6 +700,10 @@ IImage8* Thumbnail::processImage (const procparams::ProcParams& params, int rhei if (params.toneCurve.autoexp && aeHistogram) ipf.getAutoExp (aeHistogram, aeHistCompression, logDefGain, params.toneCurve.clip, br, bl); + // The RAW exposure is not reflected since it's done in preprocessing. If we only have e.g. the chached thumb, + // that is already preprocessed. So we simulate the effect here roughly my modifying the exposure accordingly + if (params.raw.expos!=1) br += (params.raw.expos-1.0); + float* curve1 = new float [65536]; float* curve2 = new float [65536]; int* curve = new int [65536]; diff --git a/rtgui/thumbnail.cc b/rtgui/thumbnail.cc index 13653c094..a24351431 100644 --- a/rtgui/thumbnail.cc +++ b/rtgui/thumbnail.cc @@ -296,10 +296,12 @@ rtengine::IImage8* Thumbnail::processThumbImage (const rtengine::procparams::Pro if ( cfs.thumbImgType == CacheImageData::QUICK_THUMBNAIL ) { + // RAW internal thumbnail, no profile yet: just do some rotation etc. image = tpp->quickProcessImage (pparams, h, rtengine::TI_Nearest, scale); } else { + // Full thumbnail: apply profile image = tpp->processImage (pparams, h, rtengine::TI_Bilinear, scale); }