#!/usr/bin/perl #use strict; use GD; $width = 800; $height = 600; $outpizzle = new GD::Image($width,$height); #$outpizzle->interlaced('true'); #define a $%!@ ton of colors ... bad idea? for ($i=0; $i<10; $i++) { for ($j=0; $j<10; $j++) { for ($k=0; $k<10; $k++) { $colors[$i][$j][$k] = $outpizzle->colorAllocate($i*25,$j*25,$k*25); } } } #draw some shizzle for ($i=0; $i<$width; $i++) { for ($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;