use GD; my $string = "Das ist ein Text!"; my $font = GD::Font->Small; my $height = $font->height; my $width = $font->width; my $im = GD::Image->new($height,5 + $width * length $string); my $white = $im->colorAllocate(255,255,255); my $color = $im->colorAllocate(0,0,0); # ist Schwarz $im->transparent($white); $im->stringUp($font,0,$width * length $string,$string,$color);