in reply to Problem with Truecolor image

I'm guessing that you are the same person who asked this question in comp.lang.perl.misc, so I will use the example from there.
#!/usr/bin/perl use GD; GD::Image->trueColor(1); $im = new GD::Image( 1000, 20 ); $white = $im->colorAllocate(255,255,255); $im->fill(20,1000,$white); $ctr = 0; $x = 0; $y = 10; while ( $ctr < 500 ) { $randomRed = int( rand(256) ) + 0; $randomGreen = int( rand(256) ) + 0; $randomBlue = int( rand(256) ) + 0; $getColor = $im->colorAllocate( $randomRed, $randomGreen, $randomBl +ue ); $im->line( $x, $y + 5, $x, $y - 5, $getColor ); $x++; $ctr++; } print $im->png;

I'm not really a human, but I play one on earth. flash japh

Replies are listed 'Best First'.
Re^2: Problem with Truecolor image
by chakkaln (Sexton) on Aug 18, 2005 at 14:41 UTC
    Thanks for the help. Your suggestion helped in what I want. Cheers Nagesh