Hi,
i want to generate images of text on the fly using true type fonts.
i know that is possible using GD+FreeType, but in my webhost FreeType isn't included.
I have access to ImageMagick but it doesn't allow me to generate graphics of the with and height of the text included in them.
Example:
$file1="file1.JPG";
$out = imagecreate(500,48);
imagejpeg($out,$file1);
$file2="c:\imagemagick\martin2.JPG";
$comando="c:\imagemagick\convert -font arial.ttf -pen red -pointsize 38 -draw \"text 1,21 'Leonardo'\" $file1 $file2";
$command=system("$comando");
echo $command;
echo "Ok!";
The example creates a 500x48 pixels image with the text "Leonardo" inside, but how can i remove the extra space around the text?
Thanks in advance.