From: Kalle Sommer Nielsen Date: Mon, 22 Jun 2009 15:51:12 +0000 (+0000) Subject: MFH: Use correct data types here, and gdImageSaveAlpha for the alpha flag X-Git-Tag: php-5.2.11RC1~250 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=030aea969bee62143279d161fced95a1fa3f38f6;p=php MFH: Use correct data types here, and gdImageSaveAlpha for the alpha flag --- diff --git a/ext/gd/libgd/gd.c b/ext/gd/libgd/gd.c index 212c6663c2..46b085a3f7 100644 --- a/ext/gd/libgd/gd.c +++ b/ext/gd/libgd/gd.c @@ -3864,7 +3864,7 @@ int gdImageConvolution(gdImagePtr src, float filter[3][3], float filter_div, flo 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; @@ -3878,8 +3878,8 @@ int gdImageConvolution(gdImagePtr src, float filter[3][3], float filter_div, flo return 0; } srcback->saveAlphaFlag = 1; - srctrans = gdImageColorAllocateAlpha(srcback, 0, 0, 0, 127); - gdImageFill(srcback, 0, 0, srctrans); + 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);