Haze removal: backwards compatibility for blend mode, #5972

This commit is contained in:
Ingo Weyrich 2020-10-29 14:47:43 +01:00
parent 31a9cf3fe0
commit 5bababe46f
2 changed files with 12 additions and 2 deletions

View File

@ -8324,8 +8324,16 @@ int ProcParams::load(const Glib::ustring& fname, ParamsEdited* pedited)
assignFromKeyfile(keyFile, "Dehaze", "Strength", pedited, dehaze.strength, pedited->dehaze.strength);
assignFromKeyfile(keyFile, "Dehaze", "ShowDepthMap", pedited, dehaze.showDepthMap, pedited->dehaze.showDepthMap);
assignFromKeyfile(keyFile, "Dehaze", "Depth", pedited, dehaze.depth, pedited->dehaze.depth);
if (ppVersion < 349 && dehaze.enabled && keyFile.has_key("Dehaze", "Luminance")) {
const bool luminance = keyFile.get_boolean("Dehaze", "Luminance");
dehaze.saturation = luminance ? 0 : 100;
if (pedited) {
pedited->dehaze.saturation = true;
}
} else {
assignFromKeyfile(keyFile, "Dehaze", "Saturation", pedited, dehaze.saturation, pedited->dehaze.saturation);
}
}
if (keyFile.has_group("Film Simulation")) {
assignFromKeyfile(keyFile, "Film Simulation", "Enabled", pedited, filmSimulation.enabled, pedited->filmSimulation.enabled);

View File

@ -1,11 +1,13 @@
#pragma once
// This number has to be incremented whenever the PP3 file format is modified or the behaviour of a tool changes
#define PPVERSION 348
#define PPVERSION 349
#define PPVERSION_AEXP 301 //value of PPVERSION when auto exposure algorithm was modified
/*
Log of version changes
349 2020-10-29
replaced Haze removal Luminance checkbox with an adjuster to blend between luminance and normal mode
348 2018-09-25
Added Locallab tool parameters
347 2019-11-17