summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorIlia Alshanetsky <iliaa@php.net>2004-05-28 13:47:26 +0000
committerIlia Alshanetsky <iliaa@php.net>2004-05-28 13:47:26 +0000
commit40329bff38a8c65254a8937f7cc68e0c063ff657 (patch)
treebc0041f5d858d85a9ef6bcfdee14fc51fc6a650e
parentb9d3aafe553a4f7f302379830797966c92476322 (diff)
downloadphp-git-40329bff38a8c65254a8937f7cc68e0c063ff657.tar.gz
MFH: Fixed bug #28311 (Transparency detection code is off by 1).
-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 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;
}