Add 2 methods for magenta highlight

This commit is contained in:
Desmis
2015-10-05 15:19:36 +02:00
parent 058f5b8f98
commit 731ccb3ef5
16 changed files with 252 additions and 25 deletions

View File

@@ -149,6 +149,9 @@ void RetinexParams::setDefaults()
offs = 0;
vart = 125;
limd = 8;
highl = 10;
highlig = 100;
grbl = 50;
retinexMethod = "high";
retinexcolorspace = "Lab";
gammaretinex = "none";
@@ -1476,6 +1479,18 @@ int ProcParams::save (Glib::ustring fname, Glib::ustring fname2, bool fnameAbsol
keyFile.set_integer ("Retinex", "Limd", retinex.limd);
}
if (!pedited || pedited->retinex.highl) {
keyFile.set_integer ("Retinex", "highl", retinex.highl);
}
if (!pedited || pedited->retinex.highlig) {
keyFile.set_integer ("Retinex", "highlig", retinex.highlig);
}
if (!pedited || pedited->retinex.grbl) {
keyFile.set_integer ("Retinex", "grbl", retinex.grbl);
}
if (!pedited || pedited->retinex.retinexMethod) {
keyFile.set_string ("Retinex", "RetinexMethod", retinex.retinexMethod);
}
@@ -3876,6 +3891,30 @@ int ProcParams::load (Glib::ustring fname, ParamsEdited* pedited)
}
}
if (keyFile.has_key ("Retinex", "highl")) {
retinex.highl = keyFile.get_integer ("Retinex", "highl");
if (pedited) {
pedited->retinex.highl = true;
}
}
if (keyFile.has_key ("Retinex", "highlig")) {
retinex.highlig = keyFile.get_integer ("Retinex", "highlig");
if (pedited) {
pedited->retinex.highlig = true;
}
}
if (keyFile.has_key ("Retinex", "grbl")) {
retinex.grbl = keyFile.get_integer ("Retinex", "grbl");
if (pedited) {
pedited->retinex.grbl = true;
}
}
if (keyFile.has_key ("Retinex", "CDCurve")) {
retinex.cdcurve = keyFile.get_double_list ("Retinex", "CDCurve");
@@ -7271,6 +7310,9 @@ bool ProcParams::operator== (const ProcParams& other)
&& retinex.neigh == other.retinex.neigh
&& retinex.gain == other.retinex.gain
&& retinex.limd == other.retinex.limd
&& retinex.highl == other.retinex.highl
&& retinex.highlig == other.retinex.highlig
&& retinex.grbl == other.retinex.grbl
&& retinex.offs == other.retinex.offs
&& retinex.retinexMethod == other.retinex.retinexMethod
&& retinex.retinexcolorspace == other.retinex.retinexcolorspace