use GD;
use strict;
use warnings;

my $bild = new GD::Image(100,100); 
my $gray = $bild->colorAllocate(200,200,200);
my $blau = $bild->colorAllocate(0,0,255); 
my $rot = $bild->colorAllocate(255,0,0); 
$bild->rectangle(20,20,80,80,$rot);
$bild->rectangle(30,30,70,70,$blau);

open(OUT, ">", "gd-bild1.gif");
binmode OUT;   # nur bei Windows noetig
print OUT $bild->gif;
close OUT;
