From: Pierre Joye Date: Wed, 17 Nov 2004 20:19:35 +0000 (+0000) Subject: - Really fix imagefill, part of my previous (old) fix was not applied X-Git-Tag: RELEASE_0_2~664 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=32ff83e4daec4521f52e4eea6b2628226f04ff74;p=php - Really fix imagefill, part of my previous (old) fix was not applied (blame me), bak the alphablending and restore it on exit --- diff --git a/ext/gd/libgd/gd.c b/ext/gd/libgd/gd.c index 527e93c36f..82ba0b51b6 100644 --- a/ext/gd/libgd/gd.c +++ b/ext/gd/libgd/gd.c @@ -1877,11 +1877,17 @@ void gdImageFill(gdImagePtr im, int x, int y, int nc) int l, x1, x2, dy; int oc; /* old pixel value */ int wx2,wy2; + + int alphablending_bak; + /* stack of filled segments */ /* struct seg stack[FILL_MAX],*sp = stack;; */ struct seg *stack; struct seg *sp; + alphablending_bak = im->alphaBlendingFlag; + im->alphaBlendingFlag = 0; + if (nc==gdTiled){ _gdImageFillTiled(im,x,y,nc); return; @@ -1932,6 +1938,7 @@ skip: for (x++; x<=x2 && (gdImageGetPixel(im, x, y)!=oc); x++); } while (x<=x2); } efree(stack); + im->alphaBlendingFlag = alphablending_bak; } void _gdImageFillTiled(gdImagePtr im, int x, int y, int nc)