Author: spouliot
Date: 2007-06-21 14:17:40 -0400 (Thu, 21 Jun 2007)
New Revision: 80505

Modified:
   trunk/libgdiplus/src/ChangeLog
   trunk/libgdiplus/src/imageattributes.c
Log:
2007-06-21  Sebastien Pouliot  <[EMAIL PROTECTED]> 

        * imageattributes.c: Fix "too clever" optimization with alpha when 
        applying a ColorMatrix.



Modified: trunk/libgdiplus/src/ChangeLog
===================================================================
--- trunk/libgdiplus/src/ChangeLog      2007-06-21 18:16:26 UTC (rev 80504)
+++ trunk/libgdiplus/src/ChangeLog      2007-06-21 18:17:40 UTC (rev 80505)
@@ -1,3 +1,8 @@
+2007-06-21  Sebastien Pouliot  <[EMAIL PROTECTED]> 
+
+       * imageattributes.c: Fix "too clever" optimization with alpha when 
+       applying a ColorMatrix.
+
 2007-06-21  Sebastien Pouliot  <[EMAIL PROTECTED]>
 
        * customlinecap.c: Fix #81829 to allow either a fill or stroke path 

Modified: trunk/libgdiplus/src/imageattributes.c
===================================================================
--- trunk/libgdiplus/src/imageattributes.c      2007-06-21 18:16:26 UTC (rev 
80504)
+++ trunk/libgdiplus/src/imageattributes.c      2007-06-21 18:17:40 UTC (rev 
80505)
@@ -251,13 +251,11 @@
                                        b = (b_new > 0xff) ? 0xff : (BYTE) 
b_new;
 
                                        /* remember that Cairo use 
pre-multiplied alpha, e.g. 50% red == 0x80800000 not 0x80ff0000 */
-                                       if (a_new < 0xff) {
-                                               a = (BYTE) a_new;
+                                       a = (BYTE) a_new;
+                                       if (a < 0xff) {
                                                r = pre_multiplied_table [r][a];
                                                g = pre_multiplied_table [g][a];
                                                b = pre_multiplied_table [b][a];
-                                       } else {
-                                               a = 0xff;
                                        }
 
                                        set_pixel_bgra (color_p, 0, b, g, r, a);

_______________________________________________
Mono-patches maillist  -  [email protected]
http://lists.ximian.com/mailman/listinfo/mono-patches

Reply via email to