]> granicus.if.org Git - php/commitdiff
- MFH: Fixed a bug in GD's truecolor TTF handling.
authorDerick Rethans <derick@php.net>
Sat, 8 Mar 2003 18:28:08 +0000 (18:28 +0000)
committerDerick Rethans <derick@php.net>
Sat, 8 Mar 2003 18:28:08 +0000 (18:28 +0000)
NEWS
ext/gd/gdttf.c

diff --git a/NEWS b/NEWS
index 4523862136c112985fb2fe3e3097494b4547a5b1..fb83d78515d767b10f09fdebdc2d849d0774db27 100644 (file)
--- a/NEWS
+++ b/NEWS
@@ -24,6 +24,7 @@ PHP 4                                                                      NEWS
   --enable-memory-limit. (Andrey)
 - Added improved JPEG 2000 support for getimagesize(). (Marcus, Adam Wright)
 - Added XBM and WBMP support for getimagesize(). (Marcus)
+- Fixed a bug in GD's truecolor TTF handling. (Derick)
 - Fixed several 64-bit problems. (Dave)
 - Fixed several errors in hwapi extension. Objects weren't handled properly. (Uwe)
 - Fixed bug #22585 (Do not terminate the script on minor errors). (Ilia)
index 84c73c0efa6577117a0d0ef46e6169271a989f27..c7aa98f9cacedd7a17339790362b92c889c91a48 100644 (file)
@@ -744,11 +744,15 @@ gdttfchar(gdImage *im, int fg, font_t *font,
                        if (tweencolorkey.pixel > 0) {
                                x3 = x2 + col;
                                if (x3 >= im->sx || x3 < 0) continue;
+                               if (im->trueColor) {
+                                       pixel = &im->tpixels[y3][x3];
+                               } else {
 #if HAVE_LIBGD13
-                               pixel = &im->pixels[y3][x3];
+                                       pixel = &im->pixels[y3][x3];
 #else
-                               pixel = &im->pixels[x3][y3];
+                                       pixel = &im->pixels[x3][y3];
 #endif
+                               }
                                tweencolorkey.bgcolor = *pixel;
                                tweencolor = (tweencolor_t *)gdCacheGet(
                                        tweenColorCache, &tweencolorkey);