#!/usr/bin/perl

use GD;  # You can get the GD module from http://www.perl.com/CPAN/modules

# Create the image.
my $gif = new GD::Image(100, 100);

# Allocate colors.
my $white = $gif->colorAllocate(255, 255, 255);
my $red   = $gif->colorAllocate(255,   0,   0);

# Background color.
$gif->transparent($white);

# The circle.
$gif->arc(50, 50,        # Center x, y.
          30, 30,        # Width, Height.
          0, 360,        # Start Angle, End Angle.
          $red);         # Color.

# Output the image.
open(GIF, ">circle.gif") or die "open failed: $!\n";
binmode GIF;
print GIF $gif->gif;
close GIF;
