[gimp/gimp-2-10] Issue #6994: Color Noise produces artifacts with highly saturated…



commit da37571d923c99b0d9e24d7fb13b05e3adbb1212
Author: Michael McLaughlin <michael thecurate com>
Date:   Sat Jul 17 18:58:16 2021 +0200

    Issue #6994: Color Noise produces artifacts with highly saturated…
    
    … source colors
    
    Reviewer's (Jehan) note: a git blame shows this is a clear bug
    introduced in commit 9d19bf2a3e4, which was a cleanup patch, and the
    BOUNDS() macro was not doing exactly the same thing as the code before
    the change.
    
    (cherry picked from commit 3b3f34cd223cd47fabd7d913529dcb4aa98bff56)

 plug-ins/gimpressionist/repaint.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
---
diff --git a/plug-ins/gimpressionist/repaint.c b/plug-ins/gimpressionist/repaint.c
index c8eba2d18a..994806868f 100644
--- a/plug-ins/gimpressionist/repaint.c
+++ b/plug-ins/gimpressionist/repaint.c
@@ -1035,7 +1035,7 @@ repaint (ppm_t *p, ppm_t *a)
       if (runningvals.color_noise > 0.0)
         {
           double v = runningvals.color_noise;
-#define BOUNDS(a) (((a) < 0) ? (a) : ((a) > 255) ? 255 : (a))
+#define BOUNDS(a) (((a) < 0) ? (0) : ((a) > 255) ? 255 : (a))
 #define MYASSIGN(a) \
     { \
         a = a + g_rand_double_range (random_generator, -v/2.0, v/2.0); \


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]