added checkbox to let the user decide whether to clamp or not

This commit is contained in:
Alberto Griggio
2018-04-05 11:22:05 +02:00
parent 426380e8d1
commit 46327259e2
8 changed files with 73 additions and 32 deletions

View File

@@ -50,6 +50,7 @@ void ParamsEdited::set (bool v)
toneCurve.hrenabled = v;
toneCurve.method = v;
toneCurve.histmatching = v;
toneCurve.clampOOG = v;
retinex.cdcurve = v;
retinex.mapcurve = v;
retinex.cdHcurve = v;
@@ -610,6 +611,7 @@ void ParamsEdited::initFrom (const std::vector<rtengine::procparams::ProcParams>
toneCurve.hrenabled = toneCurve.hrenabled && p.toneCurve.hrenabled == other.toneCurve.hrenabled;
toneCurve.method = toneCurve.method && p.toneCurve.method == other.toneCurve.method;
toneCurve.histmatching = toneCurve.histmatching && p.toneCurve.histmatching == other.toneCurve.histmatching;
toneCurve.clampOOG = toneCurve.clampOOG && p.toneCurve.clampOOG == other.toneCurve.clampOOG;
retinex.cdcurve = retinex.cdcurve && p.retinex.cdcurve == other.retinex.cdcurve;
retinex.mapcurve = retinex.mapcurve && p.retinex.mapcurve == other.retinex.mapcurve;
retinex.cdHcurve = retinex.cdHcurve && p.retinex.cdHcurve == other.retinex.cdHcurve;
@@ -1210,6 +1212,10 @@ void ParamsEdited::combine (rtengine::procparams::ProcParams& toEdit, const rten
toEdit.toneCurve.histmatching = mods.toneCurve.histmatching;
}
if (toneCurve.clampOOG) {
toEdit.toneCurve.clampOOG = mods.toneCurve.clampOOG;
}
if (retinex.enabled) {
toEdit.retinex.enabled = mods.retinex.enabled;
}