cvs: php-src /ext/gd/libgd gd.c

From: Date: Sun, 12 Apr 2009 14:45:05 +0000
Subject: cvs: php-src /ext/gd/libgd gd.c
Groups: php.cvs 
Request: Send a blank email to php-cvs+get-56998@lists.php.net to get a copy of this message
iliaa Sun Apr 12 14:45:05 2009 UTC Modified files: /php-src/ext/gd/libgd gd.c Log: MFB: Fixed bug #47946 (ImageConvolution overwrites background) http://cvs.php.net/viewvc.cgi/php-src/ext/gd/libgd/gd.c?r1=1.119&r2=1.120&diff_format=u Index: php-src/ext/gd/libgd/gd.c diff -u php-src/ext/gd/libgd/gd.c:1.119 php-src/ext/gd/libgd/gd.c:1.120 --- php-src/ext/gd/libgd/gd.c:1.119 Wed Mar 18 15:29:56 2009 +++ php-src/ext/gd/libgd/gd.c Sun Apr 12 14:45:05 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; + gdImagePtr srcback, srctrans; typedef int (*FuncPtr)(gdImagePtr, int, int); FuncPtr f; @@ -3873,6 +3873,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) {

« previous php.cvs (#56998) next »