how can i add some text to the top of the image (white)

<?php
function LoadGif ($imgname)
{
    $im = @imagecreatefromgif ($imgname);
    if (!$im) {

	$white = imagecolorallocate($im, 255, 255, 255);





    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. =)

    ok now i have this but it dont work =(

    <?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);
    ?>
    
      Write a Reply...