Guest User

Untitled

a guest
Jun 17th, 2018
92
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Perl 0.37 KB | None | 0 0
  1. #!/usr/bin/perl
  2.  
  3. use GD;
  4.  
  5. my $im = new GD::Image(1024,1024);
  6. for(my $x = 0; $x < 1024;$x++) {
  7.     for(my $y = 0; $y < 1024;$y++) {
  8.         my $color = $im->colorAllocate(int(rand(255)), int(rand(255)), int(rand(255)));
  9.         $im->setPixel($x, $y, $color);
  10.     }
  11. }
  12.  
  13. open FILE, ">image.jpg" or die $!;
  14.     binmode FILE;
  15.     print FILE $im->jpeg(100);
  16. close FILE;
Add Comment
Please, Sign In to add comment