use GD;
print "Content-type: Text/html\n\n";
$x = 128;
$y = 160;
$image = new GD::Image($x,$y);
$white = $image->colorAllocate(255,255,255);
$red = $image->colorAllocate(255,0,0);
$black = $image->colorAllocate(0,0,0);
$image->string(gdLargeFont,0,0,"test",$red);
$image->line(1,1,30,30,$black);
$image->line(30,1,1,50,$black);
$testimg="testimage_neu.gif";
$gifimage= $image->gif;
open(FILE,"> $testimg");
print FILE "$gifimage";
close(FILE);