Rawtherapee: Bug in evaluating Catmull-Rom curves with straight segments at 0 or 1

Created on 7 Dec 2018  路  4Comments  路  Source: Beep6581/RawTherapee

See here for examples of the weird behaviour:

https://discuss.pixls.us/t/5-5-rc1-curve-behaviour/10165

Here's a patch (to be applied after #5068 gets merged)

diff --git a/rtengine/diagonalcurves.cc b/rtengine/diagonalcurves.cc
--- a/rtengine/diagonalcurves.cc
+++ b/rtengine/diagonalcurves.cc
@@ -326,6 +326,9 @@
     if (p1_y == p2_y && (p1_y == 0 || p1_y == 1)) {
         for (i = 1; i < n_points-1; ++i) {
             t = p1_x + space * i;
+            if (t >= p2_x) {
+                break;
+            }
             res_x.push_back(t);
             res_y.push_back(p1_y);
         }
bug

All 4 comments

@agriggio I edited your post (the link was wrong)

Fix confirmed.

can I merge (in releases)?

Please merge to dev

Was this page helpful?
0 / 5 - 0 ratings