SparkyEE has asked for the wisdom of the Perl Monks concerning the following question:
#!/usr/bin/perl -w use GD; # create a new image $image = new GD::Image(100,100); # allocate some colors $white = $image->colorAllocate(255,255,255); $black = $image->colorAllocate(0,0,0); $red = $image->colorAllocate(255,0,0); $blue = $image->colorAllocate(0,0,255); # make the background transparent and interlaced $image->transparent($white); $image->interlaced('true'); # Put a black frame around the picture $image->rectangle(0,0,99,99,$black); # Draw a blue oval $image->arc(50,50,95,75,0,360,$blue); # And fill it with red $image->fill(50,50,$red); # make sure we are writing to a binary stream binmode STDOUT; # Convert the image to PNG and print it on standard # output print $image->png;
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Using GD on MS Windows
by cdarke (Prior) on Aug 29, 2006 at 15:28 UTC | |
by SparkyEE (Initiate) on Aug 29, 2006 at 15:45 UTC | |
by strat (Canon) on Aug 30, 2006 at 08:41 UTC | |
by Solo (Deacon) on Aug 29, 2006 at 17:19 UTC | |
by ww (Archbishop) on Aug 29, 2006 at 17:26 UTC | |
|
Re: Using GD on MS Windows
by odha57 (Monk) on Aug 29, 2006 at 20:54 UTC |