YakitoriSD has asked for the wisdom of the Perl Monks concerning the following question:
That's all. Thanks.#!/usr/bin/perl -w use strict; use GD; my (%arcData,$orientation,$white,$black,$red,@insertData,$img); %arcData=(topRight=>'0,25,50,50,270,360', topLeft=>'25,25,50,50,180,270', bottomRight=>'0,0,50,50,0,90', bottomLeft=>'25,0,50,50,90,180'); foreach $orientation (keys(%arcData)) { @insertData=split(/,/,$arcData{$orientation}); $img=new GD::Image(25,25); $white=$img->colorAllocate(255,255,255); $img->transparent($white); $black=$img->colorAllocate(0,0,0); $img->arc(@insertData,$black); $red=$img->colorAllocate(255,0,0); $img->fill(@insertData[0,1],$red); open (IMAGEOUT,">$orientation.gif")||die("can't write to $orientat +ion.gif: $!"); binmode (IMAGEOUT); print IMAGEOUT $$orientation->gif; close (IMAGEOUT); print "wrote $orientation.gif.\n"; }
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
(ar0n) Re: GD segfault
by ar0n (Priest) on May 12, 2001 at 04:04 UTC | |
|
Re: GD segfault
by dws (Chancellor) on May 12, 2001 at 03:22 UTC | |
|
Re: GD segfault
by YakitoriSD (Initiate) on May 12, 2001 at 03:34 UTC | |
|
Re: GD segfault
by YakitoriSD (Initiate) on May 12, 2001 at 04:22 UTC |