[gimp/pippin/linear-is-the-new-black] app: gimp_composite_blend reintroduce alpha weighting in over



commit 30905caf87d3524b68006e3d6ec2573506acccc7
Author: Øyvind Kolås <pippin gimp org>
Date:   Wed Jan 18 17:21:28 2017 +0100

    app: gimp_composite_blend reintroduce alpha weighting in over

 .../layer-modes/gimpoperationpointlayermode.h      |    2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)
---
diff --git a/app/operations/layer-modes/gimpoperationpointlayermode.h 
b/app/operations/layer-modes/gimpoperationpointlayermode.h
index 5caab5d..e3a90c8 100644
--- a/app/operations/layer-modes/gimpoperationpointlayermode.h
+++ b/app/operations/layer-modes/gimpoperationpointlayermode.h
@@ -257,7 +257,9 @@ gimp_composite_blend (gfloat                *in,
             else
             {
               gint   b;
+              //gfloat ratio = comp_alpha / new_alpha;
               for (b = RED; b < ALPHA; b++)
+                //out[b] = ratio * (in[ALPHA] * (blend_out[b] - layer[b]) + layer[b] - in[b]) + in[b];
                 out[b] = blend_out[b] * comp_alpha + blend_in[b] * (1.0f - comp_alpha);
             }
  


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