Note that GIF support is now deprecated in PHP/gdlib since the issues with Unisys deciding to try and soak the web for money on their goofy patented compression in gifs.
I now use pngs and jpegs, as well as bmps, which are all supported by the latest libgd and php4.
<?
$image="scoreboard.png";
$x_image=2000;
$y_image=500;
$id=imagecreate($x_image,$y_image);
The first color allocated determines
background color. Here it's white.
$white = ImageColorAllocate($id,255,255,255);
Print the header:
$header="Summary Scores of Teams by Presenters";
The following ttf font is in the current directory.
$ttf_font = "Bluehigb.ttf";
$head_size=30;
here we figure out the coords to put
the header in the middle top of the page.
$tmp=ImageTTFBBox($head_size,0,$ttf_font,$header);
$hx=($x_image-$tmp[2])/2;
$hy=30;
$cyan = ImageColorAllocate($id, 37,44,180);
ImageTTFText($id,$head_size,0,$hx,$hy,$cyan,$ttf_font,$header);
imagepng($id,"temp6.png");
?>
<img src=temp6.png>