#! perl -slw use strict; use GD; my $map = GD::Image->new( 5000, 5000, 1 ) or die $!; my $index = 0; my $bg = $map->colorAllocate( 0, 0, 0 ); $map->filledRectangle( 0, 0, 4999, 4999, $bg ); for my $y ( map{ $_ *10 +5 } 0 .. 499 ) { for my $x ( map{ $_ * 10 + 5 } 0 .. 499 ) { my $color = $map->colorAllocate( unpack 'xCCC', pack 'N', $index += 64 ); # print $color; $map->filledEllipse( $x, $y, 10, 10, $color ); } } open IMG, '>:raw', '569929.png' or die $!; print IMG $map->png; close IMG;