removed local contrast inside the S/H tool (remapped to the new local contrast tool)

See #4247
This commit is contained in:
Alberto Griggio
2017-12-22 23:59:44 +01:00
parent 48ecbd169d
commit 156cb762ec
10 changed files with 24 additions and 49 deletions

View File

@@ -1492,7 +1492,6 @@ SHParams::SHParams() :
htonalwidth(80),
shadows(0),
stonalwidth(80),
localcontrast(0),
radius(40)
{
}
@@ -1506,7 +1505,6 @@ bool SHParams::operator ==(const SHParams& other) const
&& htonalwidth == other.htonalwidth
&& shadows == other.shadows
&& stonalwidth == other.stonalwidth
&& localcontrast == other.localcontrast
&& radius == other.radius;
}
@@ -3043,7 +3041,6 @@ int ProcParams::save(const Glib::ustring& fname, const Glib::ustring& fname2, bo
saveToKeyfile(!pedited || pedited->sh.htonalwidth, "Shadows & Highlights", "HighlightTonalWidth", sh.htonalwidth, keyFile);
saveToKeyfile(!pedited || pedited->sh.shadows, "Shadows & Highlights", "Shadows", sh.shadows, keyFile);
saveToKeyfile(!pedited || pedited->sh.stonalwidth, "Shadows & Highlights", "ShadowTonalWidth", sh.stonalwidth, keyFile);
saveToKeyfile(!pedited || pedited->sh.localcontrast, "Shadows & Highlights", "LocalContrast", sh.localcontrast, keyFile);
saveToKeyfile(!pedited || pedited->sh.radius, "Shadows & Highlights", "Radius", sh.radius, keyFile);
// Crop
@@ -3934,8 +3931,22 @@ int ProcParams::load(const Glib::ustring& fname, ParamsEdited* pedited)
assignFromKeyfile(keyFile, "Shadows & Highlights", "HighlightTonalWidth", pedited, sh.htonalwidth, pedited->sh.htonalwidth);
assignFromKeyfile(keyFile, "Shadows & Highlights", "Shadows", pedited, sh.shadows, pedited->sh.shadows);
assignFromKeyfile(keyFile, "Shadows & Highlights", "ShadowTonalWidth", pedited, sh.stonalwidth, pedited->sh.stonalwidth);
assignFromKeyfile(keyFile, "Shadows & Highlights", "LocalContrast", pedited, sh.localcontrast, pedited->sh.localcontrast);
assignFromKeyfile(keyFile, "Shadows & Highlights", "Radius", pedited, sh.radius, pedited->sh.radius);
if (keyFile.has_key("Shadows & Highlights", "LocalContrast") && ppVersion < 329) {
int lc = keyFile.get_integer("Shadows & Highlights", "LocalContrast");
localContrast.amount = float(lc) / (sh.hq ? 500.0 : 30.);
if (pedited) {
pedited->localContrast.amount = true;
}
localContrast.enabled = sh.enabled;
if (pedited) {
pedited->localContrast.enabled = true;
}
localContrast.radius = sh.radius;
if (pedited) {
pedited->localContrast.radius = true;
}
}
}
if (keyFile.has_group ("Crop")) {