The function ImageCreate() creates a PALETTE image.
The function ImageCreateFromJPEG() creates a TRUE COLOR image.
When you use GD 2.0 you will get an error when you try to use ImageCopy()
with one True color image and one Palette image.
Be sure to convert one of the images before using ImageCopy() or use ImageCreateTrueColor() instead of ImageCreate().