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

index 68c74aa4032fae6c7a81a87f45260426967cae7c..60dbb6de65612a66ea79cafad9701d21243e381c 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;
                        }