[gtk+] [gdkcairo] Fix color premultiplication



commit 10601b833a530911673d3051078eb7b07412fc98
Author: Behdad Esfahbod <behdad behdad org>
Date:   Thu Sep 5 18:42:45 2013 -0400

    [gdkcairo] Fix color premultiplication
    
    https://bugzilla.gnome.org/show_bug.cgi?id=513812

 gdk/gdkcairo.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
---
diff --git a/gdk/gdkcairo.c b/gdk/gdkcairo.c
index 74bc636..67fc35a 100644
--- a/gdk/gdkcairo.c
+++ b/gdk/gdkcairo.c
@@ -244,7 +244,7 @@ gdk_cairo_surface_create_from_pixbuf (const GdkPixbuf *pixbuf,
           guchar *end = p + 4 * width;
           guint t1,t2,t3;
 
-#define MULT(d,c,a,t) G_STMT_START { t = c * a + 0x7f; d = ((t >> 8) + t) >> 8; } G_STMT_END
+#define MULT(d,c,a,t) G_STMT_START { t = c * a + 0x80; d = ((t >> 8) + t) >> 8; } G_STMT_END
 
           while (p < end)
             {


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