in reply to Re^4: Perl GD problem
in thread Perl GD problem
From the GD documentation:
$index = $image->colorAllocate(red,green,blue)(emphasis is mine)This allocates a color with the specified red, green and blue components and returns its index in the color table, if specified. The first color allocated in this way becomes the image's background color. (255,255,255) is white (all pixels on). (0,0,0) is black (all pixels off). (255,0,0) is fully saturated red. (127,127,127) is 50% gray. You can find plenty of examples in /usr/X11/lib/X11/rgb.txt.
So, before your loop do:
$im->colorAllocate(255,255,255);
|
|---|