RAW exposure effect now simulated in the thumbnails; see issue #441

This commit is contained in:
Oliver Duis
2011-03-08 17:06:25 +01:00
parent 3ce981e16c
commit 2bd2afc544
2 changed files with 8 additions and 0 deletions

View File

@@ -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];

View File

@@ -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);
}