I'm trying to use the GD library for the first time. I have successfully created an image, but I'm having problems putting text in those images. Any ideas on how I can get this working?
Thanks,
DLB
Here's the source code I modified from an example I found.
<?php
Header ("Content-type: image/png");
$im = imagecreate (400, 30);
$black = ImageColorAllocate ($im, 0, 0, 0);
$blue = ImageColorAllocate ($im, 0, 0, 255);
ImageTTFText ($im, 20, 0, 10, 20, $blue, "/usr/share/fonts/default/TrueType/timr____.ttf", "Testing...");
ImagePNG ($im);
ImageDestroy ($im);
?>
And this is what was returned.
Warning: ImageTtfText: No TTF support in this PHP build in /www/test/test1.php on line 7
phpinfo() shows the following items of interest in the configure command:
'--with-gd'
'--with-gdbm'
'--with-gettext'
'--with-jpeg-dir=/usr'
'--with-png'
'--with-ttf'
'--with-zlib'