in reply to GD reducing pallete causes major problems.

I can't answer from any experience, but, here goes.

The image already has a set palette. Judging from the image I would say it already has all 256 colors allocated. You then print text on the image in green. If green isn’t already in those 256 colors, then it will have to overwrite one of the existing colors in the palette. Thus when writing the new image, the palette will be messed up. Perhaps you should use the colorClosest function instead? ($index = $image->colorClosest(red,green,blue)) That way you won’t change the current palette.

See GD docs for more information.

I could be completely wrong, but no one else has answered yet. :)