I have a technical question regarding writing to images. I can't seem to figure out how to write multiple lines in multiple different spots over a single image.
When I have only 1 line being written it works fine, but the following code gives me errors:
<?php
header ("Content-type: image/png");
$handle = imagecreatefrompng('sim1.png');
$txt_color = ImageColorAllocate ($handle, 0, 0, 0);
ImageTTFText ($handle, 20, 0, 58, 34, $txt_color, "BLUEHIGH.TTF", "MyText");
ImageTTFText ($handle, 20, 0, 58, 54, $txt_color, "BLUEHIGH.TTF", "MoreText");
ImagePng ($handle);
?>
The second ImageTTFText line seems to mess up the script. I think that if I was to write the first line on the image, save the changed image to the server, then reopen the image I would be able to write the second line but there has to be an easier way then this. Any suggestions?
BTW - I know that what I am trying to do can be done with the ImageString() function but I would like to be able to have the added flexibility of the ImageTTFText() function.