KGMoney,
It's actually pretty simple, as long as you're using PHP 4.0.6 or higher. With PHP 4.0.5 and eariler, there may be a work about.... but I don't don't it🙂 You just need to use the ImageCreateFromJPEG() and ImageCreateFromPNG() functions to create the image resource identifiers you'll work with. You use the ImageCopyMerged function to copy one of the image resources onto the other. Finally use the ImageJPEG() and ImagePNG() functions to output the merged image in the format you desire. Read the Image Functions section of the PHP manual for more info.
<?php
// create the image resource identifers
$img1 = ImageCreateFromJPEG("./base.jpg");
$img2 = ImageCreateFromPNG("./overlay.png");
// merge the images, using a 50% opacity in the overlay
ImageCopyMerge ($img1, $img2, 0, 0, 0, 0, ImageSX($img2), ImageSY($img2), 50);
// write the new image to disk
ImagePNG($img1, "./new.png");
// print the new image to the screen
echo "<img src=\"./new.png\" border=\"0\" width=\"" . ImageSX($img1) . "\" height=\"" . ImageSX($img1) . "\">\n";
// destroy the image identifiers
ImageDestroy($img1);
ImageDestroy($img2);
?>
HTH.
Geoff A. Virgo