Was steht denn in $@ wenn du $gd->string(....) aufrufst?
Quote
$img->string($string)
(…)
This method returns a polygon indicating the bounding box of the rendered text. If an error occurred (such as invalid font specification) it returns undef and an error message in $@.