... ## Set the default to truecolor images. GD::Image->trueColor( 1 ); # create a new image my $im = GD::Image->new( $filename ); if ($size eq "l") { $im->string(gdMediumBoldFont,27,44,"Secure ". GT::Date::date_get(), 0 ); } elsif ($size eq "m") { $im->string(gdMediumBoldFont,29,26,"Secure ". GT::Date::date_get(), 0 ); } elsif ($size eq "s") { $im->string(gdTinyFont,15,26,"Safe " . GT::Date::date_get() , 0); } binmode STDOUT; print $im->png; #### sub rgb2n{ unpack 'N', pack 'CCCC', 0, @_ } rgb2n( 255, 0, 0 ); ## Red rgb2n( 0, 255, 0 ); ## Green rgb2n( 0, 0, 255 ); ## Blue