From: Ilia Alshanetsky Date: Fri, 28 May 2004 13:47:26 +0000 (+0000) Subject: MFH: Fixed bug #28311 (Transparency detection code is off by 1). X-Git-Tag: php-4.3.7~13 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=40329bff38a8c65254a8937f7cc68e0c063ff657;p=php MFH: 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 351751c775..d280c70f83 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; }