From 40329bff38a8c65254a8937f7cc68e0c063ff657 Mon Sep 17 00:00:00 2001 From: Ilia Alshanetsky Date: Fri, 28 May 2004 13:47:26 +0000 Subject: [PATCH] MFH: Fixed bug #28311 (Transparency detection code is off by 1). --- ext/gd/libgd/gd_topal.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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; } -- 2.50.1