From 88123cdd146bc73d314fb0312030af013217996f Mon Sep 17 00:00:00 2001 From: heckflosse Date: Sun, 21 Jan 2018 18:01:07 +0100 Subject: [PATCH] Set last curve point of auto matched curve always to 1;1 --- rtengine/histmatching.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/rtengine/histmatching.cc b/rtengine/histmatching.cc index 5b7647f49..be618d4d7 100644 --- a/rtengine/histmatching.cc +++ b/rtengine/histmatching.cc @@ -119,7 +119,7 @@ void mappingToCurve(const std::vector &mapping, std::vector &curve) doit(idx, int(mapping.size()), step, idx - step > step / 2); if (curve.size() <= 2 || curve.back() < 0.99 || (1 - curve[curve.size()-2] > step / 512.0 && curve.back() < coord(mapping.back()))) { curve.emplace_back(1.0); - curve.emplace_back(coord(mapping.back())); + curve.emplace_back(1.0); } if (curve.size() < 4) { curve = { DCT_Linear }; // not enough points, fall back to linear