kalle           Sat Apr 25 06:20:26 2009 UTC

  Modified files:              
    /php-src/ext/gd/libgd       gd.c 
  Log:
  Use correct data types here, and gdImageSaveAlpha for the alpha flag
  
http://cvs.php.net/viewvc.cgi/php-src/ext/gd/libgd/gd.c?r1=1.121&r2=1.122&diff_format=u
Index: php-src/ext/gd/libgd/gd.c
diff -u php-src/ext/gd/libgd/gd.c:1.121 php-src/ext/gd/libgd/gd.c:1.122
--- php-src/ext/gd/libgd/gd.c:1.121     Thu Apr 23 16:25:17 2009
+++ php-src/ext/gd/libgd/gd.c   Sat Apr 25 06:20:26 2009
@@ -3863,7 +3863,7 @@
        int         x, y, i, j, new_a;
        float       new_r, new_g, new_b;
        int         new_pxl, pxl=0;
-       gdImagePtr  srcback, srctrans;
+       gdImagePtr  srcback;
        typedef int (*FuncPtr)(gdImagePtr, int, int);
        FuncPtr f;
 
@@ -3876,9 +3876,10 @@
        if (srcback==NULL) {
                return 0;
        }
-       srcback->saveAlphaFlag = 1;
-       srctrans = gdImageColorAllocateAlpha(srcback, 0, 0, 0, 127);
-       gdImageFill(srcback, 0, 0, srctrans);
+
+       gdImageSaveAlpha(srcback, 1);
+       new_pxl = gdImageColorAllocateAlpha(srcback, 0, 0, 0, 127);
+       gdImageFill(srcback, 0, 0, new_pxl);
 
        gdImageCopy(srcback, src,0,0,0,0,src->sx,src->sy);
 



-- 
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to