#!C:/Perl/bin/perl -w use strict; use CGI::Carp qw(fatalsToBrowser); use GD; #createanewimage my $im=new GD::Image(100,100); #allocatesomecolors my $white=$im->colorAllocate(255,255,255); my $black=$im->colorAllocate(0,0,0); my $red=$im->colorAllocate(255,0,0); my $blue=$im->colorAllocate(0,0,255); #makethebackgroundtransparentandinterlaced $im->transparent($white); $im->interlaced('true'); #Putablackframearoundthepicture $im->rectangle(0,0,99,99,$black); #Drawablueoval $im->arc(50,50,95,75,0,360,$blue); #Andfillitwithred $im->fill(50,50,$red); #makesurewearewritingtoabinarystream binmode STDOUT; #ConverttheimagetoPNGandprintitonstandardoutput print $im->png;