summaryrefslogtreecommitdiff
path: root/ext/gd/libgd
diff options
context:
space:
mode:
authorIlia Alshanetsky <iliaa@php.net>2004-05-09 17:47:31 +0000
committerIlia Alshanetsky <iliaa@php.net>2004-05-09 17:47:31 +0000
commit9557b4013a071176d2185211f378e726dffcd4ac (patch)
treeb831edeecd8d896b896effb6f61806e67f602f9e /ext/gd/libgd
parentd3fda74acf34ee5d067d69576851f5cb786b6250 (diff)
downloadphp-git-9557b4013a071176d2185211f378e726dffcd4ac.tar.gz
Fixed bug #28311 (Transparency detection code is off by 1).
Diffstat (limited to 'ext/gd/libgd')
-rw-r--r--ext/gd/libgd/gd_topal.c2
1 files changed, 1 insertions, 1 deletions
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;
}