diff --git a/rtengine/procparams.cc b/rtengine/procparams.cc index 97567906c..30d59dd0a 100644 --- a/rtengine/procparams.cc +++ b/rtengine/procparams.cc @@ -445,7 +445,9 @@ if (keyFile.has_group ("Exposure")) { if (keyFile.has_key ("Exposure", "Contrast")) toneCurve.contrast = keyFile.get_integer ("Exposure", "Contrast"); if (keyFile.has_key ("Exposure", "Black")) toneCurve.black = keyFile.get_integer ("Exposure", "Black"); if (keyFile.has_key ("Exposure", "HighlightCompr")) toneCurve.hlcompr = keyFile.get_integer ("Exposure", "HighlightCompr"); + if (toneCurve.hlcompr > 100) toneCurve.hlcompr = 100; // older pp3 files can have values above 100. if (keyFile.has_key ("Exposure", "ShadowCompr")) toneCurve.shcompr = keyFile.get_integer ("Exposure", "ShadowCompr"); + if (toneCurve.shcompr > 100) toneCurve.shcompr = 100; // older pp3 files can have values above 100. if (version>200) if (keyFile.has_key ("Exposure", "Curve")) toneCurve.curve = keyFile.get_double_list ("Exposure", "Curve"); }