iliaa           Sun Apr 12 14:44:34 2009 UTC

  Modified files:              (Branch: PHP_5_2)
    /php-src/ext/gd/libgd       gd.c 
    /php-src    NEWS 
  Log:
  
  MFB: Fixed bug #47946 (ImageConvolution overwrites background)
  
http://cvs.php.net/viewvc.cgi/php-src/ext/gd/libgd/gd.c?r1=1.90.2.1.2.24&r2=1.90.2.1.2.25&diff_format=u
Index: php-src/ext/gd/libgd/gd.c
diff -u php-src/ext/gd/libgd/gd.c:1.90.2.1.2.24 
php-src/ext/gd/libgd/gd.c:1.90.2.1.2.25
--- php-src/ext/gd/libgd/gd.c:1.90.2.1.2.24     Wed Dec 10 13:33:10 2008
+++ php-src/ext/gd/libgd/gd.c   Sun Apr 12 14:44:34 2009
@@ -3864,7 +3864,7 @@
        int         x, y, i, j, new_a;
        float       new_r, new_g, new_b;
        int         new_pxl, pxl=0;
-       gdImagePtr  srcback;
+       gdImagePtr  srcback, srctrans;
        typedef int (*FuncPtr)(gdImagePtr, int, int);
        FuncPtr f;
 
@@ -3874,6 +3874,10 @@
 
        /* We need the orinal image with each safe neoghb. pixel */
        srcback = gdImageCreateTrueColor (src->sx, src->sy);
+       srcback->saveAlphaFlag = 1;
+       srctrans = gdImageColorAllocateAlpha(srcback, 0, 0, 0, 127);
+       gdImageFill(srcback, 0, 0, srctrans);
+
        gdImageCopy(srcback, src,0,0,0,0,src->sx,src->sy);
 
        if (srcback==NULL) {
http://cvs.php.net/viewvc.cgi/php-src/NEWS?r1=1.2027.2.547.2.1466&r2=1.2027.2.547.2.1467&diff_format=u
Index: php-src/NEWS
diff -u php-src/NEWS:1.2027.2.547.2.1466 php-src/NEWS:1.2027.2.547.2.1467
--- php-src/NEWS:1.2027.2.547.2.1466    Wed Apr  8 00:28:03 2009
+++ php-src/NEWS        Sun Apr 12 14:44:34 2009
@@ -10,6 +10,7 @@
 - Fixed memory leak in ob_get_clean/ob_get_flush. (Christian)
 - Fixed segfault on invalid session.save_path. (Hannes)
 
+- Fixed bug #47946 (ImageConvolution overwrites background). (Ilia)
 - Fixed bug #47903 ("@" operator does not work with string offsets). (Felipe)
 - Fixed bug #47893 (CLI aborts on non blocking stdout). (Arnaud)
 - Fixed bug #47849 (Non-deep import loses the namespace). (Rob)



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

Reply via email to