Hello Mark.
This should work.
$image_info = GetImageSize("foo.gif");
list($image_width, $image_height, $image_type, $image_width_height_info) = $image_info;
print "<img src='foo.gif' $image_width_height_info>";
//- print "<BR>".$image_width_height_info; //- Uncomment To Ensure It Works, And See What It Displays!!
//- 'GetImageSize' is part of the standard PHP library, and therefore there is no need for extra GD support!