From: Ilia Alshanetsky Date: Sun, 9 May 2004 17:47:31 +0000 (+0000) Subject: Fixed bug #28311 (Transparency detection code is off by 1). X-Git-Tag: RELEASE_0_1~250 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=9557b4013a071176d2185211f378e726dffcd4ac;p=php Fixed bug #28311 (Transparency detection code is off by 1). --- diff --git a/ext/gd/libgd/gd_topal.c b/ext/gd/libgd/gd_topal.c index 68c74aa403..60dbb6de65 100644 --- a/ext/gd/libgd/gd_topal.c +++ b/ext/gd/libgd/gd_topal.c @@ -1260,7 +1260,7 @@ pass2_no_dither (j_decompress_ptr cinfo, JSAMPARRAY input_buf, JSAMPARRAY output * will later be added at the end of the palette as the transparent * index. */ - if ((im->transparent >= 0) && (im->transparent == *inptr)) { + if ((im->transparent >= 0) && (im->transparent == *(inptr - 1))) { *outptr++ = im->colorsTotal; continue; }