[gimp] Bug 732787 - Posterize doesn't work as expected with alpha channel



commit fe3c0e4020e6244929e922585cdf8e0e006808a1
Author: Michael Natterer <mitch gimp org>
Date:   Thu Sep 25 23:12:35 2014 +0200

    Bug 732787 - Posterize doesn't work as expected with alpha channel
    
    GimpOperationPosterize: also posterize the alpha channel. Seems like a
    no-brainer to me, and is actually useful (see bug). The old behavior
    is still available by simply disabling the alpha channel in the
    channels dialog.

 app/operations/gimpoperationposterize.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
---
diff --git a/app/operations/gimpoperationposterize.c b/app/operations/gimpoperationposterize.c
index b6a2663..9b7397e 100644
--- a/app/operations/gimpoperationposterize.c
+++ b/app/operations/gimpoperationposterize.c
@@ -103,7 +103,7 @@ gimp_operation_posterize_process (GeglOperation       *operation,
       dest[RED]   = RINT (src[RED]   * levels) / levels;
       dest[GREEN] = RINT (src[GREEN] * levels) / levels;
       dest[BLUE]  = RINT (src[BLUE]  * levels) / levels;
-      dest[ALPHA] = src[ALPHA];
+      dest[ALPHA] = RINT (src[ALPHA] * levels) / levels;
 
       src  += 4;
       dest += 4;


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