Hi all
This is my first attempt to wrie to this mailing list, so please bare
with me.
My problem is as follows
I'm trying to generate a dynamic picture with some text on it. The code
works fine on one of my servers, but not on the other one.
The code I'm using:
$im = imagecreatetruecolor (400, 100);
$black = imagecolorallocate ($im, 0, 0, 0 );
$white = imagecolorallocate ($im, 255, 255, 255 );
imagerectangle ($im,0, 0,399,99 ,$black);
imagefilledrectangle ($im,0, 0,399,99 ,$white);
imagettftext ($im, 30, 0, 10, 40 , $black, TTF_DIR. "times.ttf",
"Hello World!");
header ("Content-type: image/png" );
imagepng ($im);
Where TTF_DIR is the complete path to the times.ttf-file (which i've
chmodded to 777).
This is the gd-info from where it works:
GD Support enabled
GD Version bundled (2.0.28 compatible)
FreeType Support enabled
FreeType Linkage with freetype
FreeType Version 2.1.3
GIF Read Support enabled
GIF Create Support enabled
JPG Support enabled
PNG Support enabled
WBMP Support enabled
XBM Support enabled
The one things that differs between the servers is:
"FreeType Linkage with TTF library" is set on the faulty one. Can
this be the problem?
Cheers
/Fredrik Thunberg
thunis@xxxxxxxxxxxxxxxxxxx
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php