Results 1 to 2 of 2
Aug 12, 2011, 03:21 #1
Merging 2 PNGs and keeping transparency
I haven't done much with GD so any help appreciated.
I am creating one image out of two. One is a pretty picture, one is the frame. The frame is merged ontop of the pretty picture but the transparency is not coming through, any ideas?
$your_original_image = "img1.png";
$your_frame_image = "img2.png";
$image = imagecreatefrompng($your_original_image);
$frame = imagecreatefrompng($your_original_frame);
imagecopymerge($image, $frame, 0, 0, 0, 0, 50, 50, 100);
Aug 12, 2011, 12:49 #2
Sorted it - got tired so left it. Woke up re-wrote from scrtahc and it fine - don't ask me why? Tired eyes probably!