PHP 4.0 Bug #8544 Updated: ImageTTFText
| From: | frederic dot lamsens at rug dot ac dot be | Date: | Wed, 03 Jan 2001 22:39:46 +0000 |
| Subject: | PHP 4.0 Bug #8544 Updated: ImageTTFText | ||
| Groups: | php.dev | ||
| Request: | Send a blank email to php-dev+get-42887@lists.php.net to get a copy of this message | ||
ID: 8544
User Update by: frederic.lamsens@rug.ac.be
Status: Open
Bug Type: GD related
Description: ImageTTFText
Example:
ImageTTFText ($theImage, 40, 0, 30, 150, $black, "/home/httpd/html/flwi/pcroom/arial.ttf",
"Testing... Omega: Ω");
Previous Comments:
---------------------------------------------------------------------------
[2001-01-03 17:33:42] frederic.lamsens@rug.ac.be
System:
Linux 2.2.17-21mdksecure #1 SMP Thu Oct 5
Asus Dual PIII 450 Mhz
NVidia Riva128
256 Mb SDRam
PHP Configuration:
./configure --with-mysql
--with-apxs=/usr/local/apache/bin/apxs
--with-ttf --with-gd --with-ldap
GD:
GD Version 1.8.1 (static)
Freetype Version 1.3
FreeType Support enabled
FreeType Linkage with TTF library
PNG Support enabled
When I compiled PHP and used ImageTTFText, the result was not what I expected. Although I can see my
input string, the text was shown at an angle of 270 degrees and mirrored. So 'The' looks
like '|-' and the 2 next charachters are below the '|-'.
I have been able to solve the problem by changing the php code and recompile the whole thing.
Filename: gdttf.c (located in extgd)
Line: around 743
Original code:
#if HAVE_LIBGD13
pixel = &im->pixels[y3][x3];
#else
pixel = &im->pixels[x3][y3];
#endif
New code:
pixel = &im->pixels[y3][x3];
By reversing the arguments, the image is now correct.
I hope this information helps ...
---------------------------------------------------------------------------
Full Bug description available at: http://bugs.php.net/?id=8544