Using the GD library, I'm having a bit of difficulty getting
imagecolorallocate() to work as I would expect it to. Using a call of
$color = imagecolorallocate ($image, 255, 0, 0);
(after loading with $image = imagecreatefromjpeg( $filename );), I
would expect a call to imageline() using $color to draw a red line.
Under GD 2.0.12 this works fine.
But under GD 1.6.2, this is not true. The line winds up using one of
the colors in the image's existing palette instead of creating a new
entry in the palette as I would think it should.
How do I get 1.6.2 to actually use the new color I've defined? So far
the only work-around I've discovered is to make sure the image has at
least 1 red pixel somewhere in it.
I'm stuck with 1.6 since that is what the hosting service has
installed.
Thanks,
Neal