#!/usr/local/bin/perl use GD; # create a new image $im = new GD::Image(200, 36); # allocate some colors $white = $im->colorAllocate(255,255,255); $black = $im->colorAllocate(0,0,0); $red = $im->colorAllocate(255,0,0); $blue = $im->colorAllocate(0,0,255); $im->stringTTF($black,"test.ttf", 12, 0, 0, 0,"Font Reactor") or die $!; open(IMAGE, ">test.png") or die; binmode IMAGE; print IMAGE $im->png;