]> granicus.if.org Git - php/commitdiff
MFH: Fixed bug #28311 (Transparency detection code is off by 1).
authorIlia Alshanetsky <iliaa@php.net>
Fri, 28 May 2004 13:47:26 +0000 (13:47 +0000)
committerIlia Alshanetsky <iliaa@php.net>
Fri, 28 May 2004 13:47:26 +0000 (13:47 +0000)
ext/gd/libgd/gd_topal.c

index 351751c77560dde132925848b236456f9bda66bd..d280c70f8351077e4c3dc6b4eb68f03fd880df6a 100644 (file)
@@ -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;
                        }