Advertisement
Guest User

RelaxGDPatch

a guest
Nov 8th, 2011
245
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Diff 0.75 KB | None | 0 0
  1. diff --git a/go.pl b/go.pl
  2. index 0d6ecf0..35019a6 100644
  3. --- a/go.pl
  4. +++ b/go.pl
  5. @@ -1,5 +1,5 @@
  6.  #!/usr/bin/env perl
  7. -use strict; use GD;
  8. +use strict; use GD; use v5.10;
  9.  my $res = 16000;
  10.  my $outres = 1000;
  11.  my $format = 2.0;
  12. @@ -19,11 +19,13 @@ for my $z(0..20) {
  13.          $img->ellipse(rand($res), rand($res), rand($res), rand($res), gdStyled)) if (rand(10)>2);
  14.      }
  15.  
  16. -    print "processing $z.png...\n";
  17. +    my $filename = sprintf("%02d.png", $z);
  18. +
  19. +    say "processing ${filename}...";
  20.      my $m = new GD::Image($outres*$format, $outres);
  21.      $m->copyResized($img, 0, 0, 0, 0, $outres*$format, $outres, $res, $res);
  22.  
  23. -    open F => '>'.$z.'.png';
  24. +    open F => '>'.$filename;
  25.      binmode F;
  26.      print F $m->png;
  27.      close F;
  28.  
  29.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement