iliaa Sun Apr 12 14:43:21 2009 UTC Modified files: (Branch: PHP_5_3) /php-src/ext/gd/libgd gd.c Log: Fixed bug #47946 (ImageConvolution overwrites background) # original patch by jcolby at acsol dot net http://cvs.php.net/viewvc.cgi/php-src/ext/gd/libgd/gd.c?r1=1.90.2.1.2.21.2.6&r2=1.90.2.1.2.21.2.7&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.21.2.6 php-src/ext/gd/libgd/gd.c:1.90.2.1.2.21.2.7 --- php-src/ext/gd/libgd/gd.c:1.90.2.1.2.21.2.6 Wed Mar 18 15:30:37 2009 +++ php-src/ext/gd/libgd/gd.c Sun Apr 12 14:43:21 2009 @@ -3870,7 +3870,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; @@ -3880,6 +3880,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) {
-- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php