#!/usr/bin/perl -w use GD; use GD::Text; my $gd_text = GD::Text->new() or die GD::Text::error(); $gd_text->set_font(gdSmallFont); $gd_text->set_text("nobody\@perlmonks.org"); my ($w, $h) = $gd_text->get('width', 'height'); my $gd = GD::Image->new($w,$h); $white = $gd->colorAllocate(255,255,255); $black = $gd->colorAllocate(0,0,0); $gd->transparent($white); $gd->string(gdSmallFont, 0, 0, "nobody\@perlmonks.org",$black); binmode STDOUT; print $gd->png;