dehaze: added more user-controllable parameters

This commit is contained in:
Alberto Griggio
2018-10-11 13:43:45 +02:00
parent 83f5205006
commit 74ae459bf2
8 changed files with 190 additions and 12 deletions

View File

@@ -568,6 +568,9 @@ void ParamsEdited::set(bool v)
softlight.strength = v;
dehaze.enabled = v;
dehaze.strength = v;
dehaze.showDepthMap = v;
dehaze.depth = v;
dehaze.detail = v;
metadata.mode = v;
exif = v;
@@ -1123,6 +1126,9 @@ void ParamsEdited::initFrom(const std::vector<rtengine::procparams::ProcParams>&
softlight.strength = softlight.strength && p.softlight.strength == other.softlight.strength;
dehaze.enabled = dehaze.enabled && p.dehaze.enabled == other.dehaze.enabled;
dehaze.strength = dehaze.strength && p.dehaze.strength == other.dehaze.strength;
dehaze.showDepthMap = dehaze.showDepthMap && p.dehaze.showDepthMap == other.dehaze.showDepthMap;
dehaze.depth = dehaze.depth && p.dehaze.depth == other.dehaze.depth;
dehaze.detail = dehaze.detail && p.dehaze.detail == other.dehaze.detail;
metadata.mode = metadata.mode && p.metadata.mode == other.metadata.mode;
// How the hell can we handle that???
@@ -3125,6 +3131,18 @@ void ParamsEdited::combine(rtengine::procparams::ProcParams& toEdit, const rteng
toEdit.dehaze.strength = dontforceSet && options.baBehav[ADDSET_DEHAZE_STRENGTH] ? toEdit.dehaze.strength + mods.dehaze.strength : mods.dehaze.strength;
}
if (dehaze.depth) {
toEdit.dehaze.depth = mods.dehaze.depth;
}
if (dehaze.detail) {
toEdit.dehaze.detail = mods.dehaze.detail;
}
if (dehaze.showDepthMap) {
toEdit.dehaze.showDepthMap = mods.dehaze.showDepthMap;
}
if (metadata.mode) {
toEdit.metadata.mode = mods.metadata.mode;
}