Enhancement to Auto Levels on behalf of Emil;
Replacements of the packaged profiles. (see issue 940)
This commit is contained in:
@@ -36,6 +36,7 @@
|
||||
#include <safegtk.h>
|
||||
#include <rawimage.h>
|
||||
#include "jpeg.h"
|
||||
#include "ppversion.h"
|
||||
|
||||
#define MAXVAL 0xffff
|
||||
#define CLIP(a) ((a)>0?((a)<MAXVAL?(a):MAXVAL):0)
|
||||
@@ -716,11 +717,17 @@ IImage8* Thumbnail::processImage (const procparams::ProcParams& params, int rhei
|
||||
}
|
||||
|
||||
// RGB processing
|
||||
double br = params.toneCurve.expcomp;
|
||||
int bl = params.toneCurve.black;
|
||||
|
||||
if (params.toneCurve.autoexp && aeHistogram)
|
||||
ipf.getAutoExp (aeHistogram, aeHistCompression, logDefGain, params.toneCurve.clip, br, bl);
|
||||
double expcomp = params.toneCurve.expcomp;
|
||||
int bright = params.toneCurve.brightness;
|
||||
int contr = params.toneCurve.contrast;
|
||||
int black = params.toneCurve.black;
|
||||
int hlcompr = params.toneCurve.hlcompr;
|
||||
int hlcomprthresh = params.toneCurve.hlcomprthresh;
|
||||
|
||||
if (params.toneCurve.autoexp && aeHistogram) {
|
||||
ipf.getAutoExp (aeHistogram, aeHistCompression, logDefGain, params.toneCurve.clip, expcomp, bright, contr, black, hlcompr, hlcomprthresh);
|
||||
//ipf.getAutoExp (aeHistogram, aeHistCompression, logDefGain, params.toneCurve.clip, params.toneCurve.expcomp, params.toneCurve.brightness, params.toneCurve.contrast, params.toneCurve.black, params.toneCurve.hlcompr);
|
||||
}
|
||||
|
||||
LUTf curve1 (65536);
|
||||
LUTf curve2 (65536);
|
||||
@@ -728,9 +735,14 @@ IImage8* Thumbnail::processImage (const procparams::ProcParams& params, int rhei
|
||||
LUTf satcurve (65536);
|
||||
|
||||
LUTu dummy;
|
||||
CurveFactory::complexCurve (br, bl/65535.0, params.toneCurve.hlcompr, params.toneCurve.hlcomprthresh, params.toneCurve.shcompr, params.toneCurve.brightness, params.toneCurve.contrast, gamma, true, params.toneCurve.curve,
|
||||
hist16, dummy, curve1, curve2, curve, dummy, 16);
|
||||
|
||||
//CurveFactory::complexCurve (expcomp, black/65535.0, params.toneCurve.hlcompr, params.toneCurve.hlcomprthresh, \
|
||||
params.toneCurve.shcompr, params.toneCurve.brightness, params.toneCurve.contrast, \
|
||||
gamma, true, params.toneCurve.curve, hist16, dummy, curve1, curve2, curve, dummy, 16);
|
||||
CurveFactory::complexCurve (expcomp, black/65535.0, hlcompr, params.toneCurve.hlcomprthresh, \
|
||||
params.toneCurve.shcompr, bright, contr, gamma, true,
|
||||
params.toneCurve.curve, hist16, dummy, curve1, curve2, curve, dummy, 16);
|
||||
|
||||
|
||||
LabImage* labView = new LabImage (fw,fh);
|
||||
|
||||
ipf.rgbProc (baseImg, labView, curve1, curve2, curve, shmap, params.toneCurve.saturation);
|
||||
@@ -829,7 +841,8 @@ void Thumbnail::applyAutoExp (procparams::ProcParams& params) {
|
||||
|
||||
if (params.toneCurve.autoexp && aeHistogram) {
|
||||
ImProcFunctions ipf (¶ms, false);
|
||||
ipf.getAutoExp (aeHistogram, aeHistCompression, log(defGain) / log(2.0), params.toneCurve.clip, params.toneCurve.expcomp, params.toneCurve.black);
|
||||
ipf.getAutoExp (aeHistogram, aeHistCompression, log(defGain)/log(2.0), params.toneCurve.clip, params.toneCurve.expcomp, \
|
||||
params.toneCurve.brightness, params.toneCurve.contrast, params.toneCurve.black, params.toneCurve.hlcompr, params.toneCurve.hlcomprthresh);
|
||||
}
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user