#! perl -slw use strict; use GD; my $img = GD::Image->new( 1000, 120, 1 ); my $index = $img->colorAllocate( 255, 0, 0 ); my @bounds = $img->stringFT( $index, "c:\\windows\\fonts\\Coprgtb.ttf", 72, 0, 100, 100, "Hello world" ); open IMG, '>', "junk.png"; binmode IMG; print IMG $img->png; close IMG;