how can i add some text to the top of the image (white)
the font file is there (base 02), Text isn’t appearing
[code=php]
<?php
function LoadGif ($imgname)
{
$im = @imagecreatefromgif ($imgname);
if (!$im) {
$white = imagecolorallocate($im, 255, 255, 255);
$grey = imagecolorallocate($im, 128, 128, 128);
$black = imagecolorallocate($im, 0, 0, 0);
$text = ‘Testing…’;
$font = ‘font.ttf’;
imagettftext($im, 20, 0, 11, 21, $grey, $font, $text);
imagettftext($im, 20, 0, 10, 20, $white, $font, $text);
imagestring ($im, 1, 5, 5, “Error loading $imgname”, $tc);
}
return $im;
}
header(“Content-Type: image/gif”);
$img = LoadGif(“header.gif”);
imagegif($img);
?>
Thanks in advanced =)