Q: Color issues with imagecopy()
I am having some issues getting imagecopy to correctly copy my image over with the correct colors. You can see my problem here: http://www.myonebaby.com/node/495/image.png . You can see the majority of the code I am using below. I have used this same type of setup before for another site and had no issues. Has anybody experienced this type of problem?
PHP Code:
$img = imageCreateFromPNG(drupal_get_path('module', 'embed').'/files/baby_bg.png');
$photo = file_directory_path().'/'.$image->images['preview'];
$photo = imageCreateFromJPEG($photo);
imagecopy($img, $photo, 1, 1, 0, 0, 197, 203);
Header ("Content-type: image/png");
ImagePng ($img);
If I do ImagePng ($photo) it will look just fine, but as soon as I try to combine the 2 and return $img it gets messed up.
Thanks,
Quinton