Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #!/usr/bin/perl
- use GD;
- my $im = new GD::Image(1024,1024);
- for(my $x = 0; $x < 1024;$x++) {
- for(my $y = 0; $y < 1024;$y++) {
- my $color = $im->colorAllocate(int(rand(255)), int(rand(255)), int(rand(255)));
- $im->setPixel($x, $y, $color);
- }
- }
- open FILE, ">image.jpg" or die $!;
- binmode FILE;
- print FILE $im->jpeg(100);
- close FILE;
Add Comment
Please, Sign In to add comment