my $outpizzle = GD::Image->new( $width, $height, 1 ); #### #!/usr/bin/perl use strict; use GD; my $width = 800; my $height = 600; my $outpizzle = new GD::Image( $width, $height, 1 ); #$outpizzle->interlaced('true'); #define a $%!@ ton of colors ... bad idea? my @colors; for ( my $i=0; $i<10; $i++) { for ( my $j=0; $j<10; $j++) { for ( my $k=0; $k<10; $k++) { $colors[$i][$j][$k] = $outpizzle->colorAllocate($i*25,$j*25,$k*25); } } } #draw some shizzle for ( my $i=0; $i<$width; $i++) { for ( my $j=0; $j<$height; $j++) { $outpizzle->setPixel($i,$j,$colors[int(10*($i/$width))][int(10*($j/$height))][0]); #print int(10*($i/$width))+"\n"; } } #output the picture open(PICTURE, ">picture.png") or die("uh oh spaghettio"); binmode PICTURE; print PICTURE $outpizzle->png; close PICTURE; ## display result on win32 systems system 'picture.png';