#!/usr/bin/perl use strict; use warnings; use Data::Dumper; use GD; my $myImage = new GD::Image(300, 100); my $index = $myImage->colorAllocate(0,0,0); my @bounds = $myImage->stringFT(255,"./visitor1.ttf",gdSmallFont,0,20,20,"Hallo"); print Dumper \$index; open(FILE, "+>", "new.png") or die $!; binmode FILE; print FILE $myImage->png;