hi
I`m able to create php generated png images, that seems to be the easy part.
--- code ---
<?
header("Content-type: image/png");
$text = "Image created by me";
$width = 500;
$height = 100;
$image = imagecreate( $width, $height);
imagecolorallocate($image,290,50,121);
$black = imagecolorallocate($image, 255, 255, 255);
imagettftext($image, 20, 0, 20, 60, $black, "/var/www/html/php/images/verdana.ttf", $text);
imagepng($image);
imagedestroy($image);
?>
That all works fine.
But when I try to indend html into it, the script bombs out and says :
The image “http://whale/deon/create2.php” cannot be displayed, because it contains errors.
This is the code i`m using.
<?
header("Content-type: image/png");
?>
<table>
<tr>
<td align="center">
<?
$text = "Image created by Deon Heunis";
$width = 500;
$height = 100;
$image = imagecreate( $width, $height);
imagecolorallocate($image,290,50,121);
$black = imagecolorallocate($image, 255, 255, 255);
imagettftext($image, 20, 0, 20, 60, $black, "/var/www/html/php/images/verdana.ttf", $text);
imagepng($image);
imagedestroy($image);
?>
</td>
</tr>
</table>
I`m stuck.
Thanks