Data commit
This commit is contained in:
parent
7387c8f97b
commit
cb5bb5e222
199093 changed files with 3378972 additions and 0 deletions
12
Task/Munching-squares/Perl/munching-squares.pl
Normal file
12
Task/Munching-squares/Perl/munching-squares.pl
Normal file
|
|
@ -0,0 +1,12 @@
|
|||
use GD;
|
||||
|
||||
my $img = GD::Image->new(256, 256, 1);
|
||||
|
||||
for my $y (0..255) {
|
||||
for my $x (0..255) {
|
||||
my $color = $img->colorAllocate( abs(255 - $x - $y), (255-$x) ^ $y , $x ^ (255-$y));
|
||||
$img->setPixel($x, $y, $color);
|
||||
}
|
||||
}
|
||||
|
||||
print $img->png
|
||||
Loading…
Add table
Add a link
Reference in a new issue