[gegl] stretch-contrast: don't modify the alpha channel



commit 0a9ad7d54dc0abcdc3c048927b88287a1237eee0
Author: Michael Henning <drawoc darkrefraction com>
Date:   Fri Dec 21 22:02:15 2012 -0500

    stretch-contrast: don't modify the alpha channel
    
    Stretching the alpha channel is broken because the op's intention is to
    modify the colors of the image. Changing the alpha is therefore unexpected.
    It also produced alpha values < 0 or > 1 for otherwise normal images.

 operations/common/stretch-contrast.c |    3 +--
 1 files changed, 1 insertions(+), 2 deletions(-)
---
diff --git a/operations/common/stretch-contrast.c b/operations/common/stretch-contrast.c
index 1307806..140367b 100644
--- a/operations/common/stretch-contrast.c
+++ b/operations/common/stretch-contrast.c
@@ -108,8 +108,7 @@ process (GeglOperation       *operation,
           out[0] = (in[0] - min) / diff;
           out[1] = (in[1] - min) / diff;
           out[2] = (in[2] - min) / diff;
-          /* FIXME: really stretch the alpha channel?? */
-          out[3] = (in[3] - min) / diff;
+          out[3] = in[3];
 
           in  += 4;
           out += 4;



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