Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- diff --git a/go.pl b/go.pl
- index 0d6ecf0..35019a6 100644
- --- a/go.pl
- +++ b/go.pl
- @@ -1,5 +1,5 @@
- #!/usr/bin/env perl
- -use strict; use GD;
- +use strict; use GD; use v5.10;
- my $res = 16000;
- my $outres = 1000;
- my $format = 2.0;
- @@ -19,11 +19,13 @@ for my $z(0..20) {
- $img->ellipse(rand($res), rand($res), rand($res), rand($res), gdStyled)) if (rand(10)>2);
- }
- - print "processing $z.png...\n";
- + my $filename = sprintf("%02d.png", $z);
- +
- + say "processing ${filename}...";
- my $m = new GD::Image($outres*$format, $outres);
- $m->copyResized($img, 0, 0, 0, 0, $outres*$format, $outres, $res, $res);
- - open F => '>'.$z.'.png';
- + open F => '>'.$filename;
- binmode F;
- print F $m->png;
- close F;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement