[gimp] app: divide blend mode, limit high values to 5.0



commit e1b7eb7245f8ee4b5bfbfdfc514c87e2cab58ea1
Author: Øyvind Kolås <pippin gimp org>
Date:   Mon Jan 16 02:36:08 2017 +0100

    app: divide blend mode, limit high values to 5.0
    
    Possibly counteracting inaccuracies in used babl conversions, but with this the
    result match legacy as expected.

 app/operations/layer-modes/gimpoperationdivide.c |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)
---
diff --git a/app/operations/layer-modes/gimpoperationdivide.c 
b/app/operations/layer-modes/gimpoperationdivide.c
index d56534d..fc8c897 100644
--- a/app/operations/layer-modes/gimpoperationdivide.c
+++ b/app/operations/layer-modes/gimpoperationdivide.c
@@ -110,8 +110,8 @@ gimp_operation_divide_process_pixels (gfloat              *in,
 
               /* make infitinities(or NaN) correspond to a really high number,
                * to get more predictable math */
-              if (!(comp > -4294967296.0f && comp < 4294967296.0f))
-                comp = 4294967296.0f;
+              if (!(comp > -4294967296.0f && comp < 5.0f))
+                comp = 5.0f;
 
               out[b] = comp * comp_alpha + in[b] * (1.0 - comp_alpha);
             }


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