ID: 25926
User updated by: olga at bluebytes dot com
Reported By: olga at bluebytes dot com
-Status: Feedback
+Status: Open
Bug Type: GD related
Operating System: Linux
PHP Version: 4.3.3
New Comment:

'./configure' '--with-apxs=/usr/local/apache/bin/apxs' '--with-xml'
'--enable-bcmath' '--enable-calendar' '--enable-ftp' '--with-gd'
'--with-jpeg-dir=/usr/local' '--with-png-dir=/usr'
'--with-xpm-dir=/usr/X11R6' '--with-ming=../ming-0.2a'
'--enable-magic-quotes' '--with-mysql' '--with-pear' '--enable-sockets'
'--enable-track-vars' '--enable-versioning' '--with-zlib' '--with-ttf'
'--with-freetype' '--enable-gd-native-ttf' '--enable-exif'

I am assuming --wtih-gd uses bundled version. Sorry if I am incorrect.

Previous Comments:

[2003-10-22 01:47:36] [email][/email]

What was the configure line you used to configure PHP?
If you didn't use the _bundled_ GD library, close this.


[2003-10-21 17:33:04] olga at bluebytes dot com

Actually, I just installed PHP Version 4.3.4RC3-dev which is marked as
stable on, and it's still not working.


[2003-10-21 15:38:47] [email][/email]

Using latest STABLE CVS snapshot with bundled GD library works just


[2003-10-20 15:50:41] olga at bluebytes dot com

ImageTTFText doesn't output any characters. If there's anything else in
the image, the rest will be fine; if the text string is the only thing,
the image will be blank.
Trying to figure out what's wrong, I took a look at the return values
from ImageTTFText as well as ImageTTFBox. They both produce huge
values, i.e. Array ( [0] => 138323388 [1] => 11 [2] => -1073754136 [3]
=> 1076636124 [4] => 138611764 [5] => 138323484 [6] => 11 [7] => 0 )

The values DO NOT depend on the font used. Furthermore, they are
different each time I load the page for the SAME font
([url][/url] shows values for "Hello world" in

Reproduce code:
//header("Content-type: image/jpeg");
$im = imagecreate(400,30);
$white = imagecolorallocate($im, 255,255,255);
$black = imagecolorallocate($im, 0,0,0);

// Replace path by your own font path
$result = imagettftext($im, 12, 0, 6, 20, $black,
"/home/blunoise/fonts/arial.ttf", "Hello world");
$bbox=imagettfbbox (12, 0, "/home/blunoise/fonts/arial.ttf", "Hello


Expected result:
A jpeg saying "Hello world"


Edit this bug report at [url][/url]