diff pidgin/gtkutils.c @ 17494:3aafa9d3119c

Fix rounding of buddy icons, it looks like when MSN Messenger converts jpgs to pngs it gives the entire image an alpha of 254, or something odd like that. Fixes #1248
author Stu Tomlinson <stu@nosnilmot.com>
date Tue, 05 Jun 2007 20:05:29 +0000
parents ff04387682ce
children 43da9c881fe9 2f9eabdc6011
line wrap: on
line diff
--- a/pidgin/gtkutils.c	Tue Jun 05 12:48:22 2007 +0000
+++ b/pidgin/gtkutils.c	Tue Jun 05 20:05:29 2007 +0000
@@ -3034,20 +3034,20 @@
 
         row = pixels;
         for (i = 3; i < rowstride; i+=4) {
-                if (row[i] != 0xff)
+                if (row[i] < 0xfe)
                         return FALSE;
         }
 
         for (i = 1; i < height - 1; i++) {
                 row = pixels + (i*rowstride);
-                if (row[3] != 0xff || row[rowstride-1] != 0xff) {
+                if (row[3] < 0xfe || row[rowstride-1] < 0xfe) {
                         return FALSE;
-                }
+            }
         }
 
         row = pixels + ((height-1) * rowstride);
         for (i = 3; i < rowstride; i+=4) {
-                if (row[i] != 0xff)
+                if (row[i] < 0xfe)
                         return FALSE;
         }