So I created a script from PHP Doc and some helpful threads/advice on SO and came out with this:
$filename = time();
$glassurl = $_GET['GlassImg'];
$frameurl = $_GET['FrameImg'];
$handleurl = "images/helpbutton.png";
$handleurl2 = "images/helpbutton.png";
$glassimg = imagecreatefromjpeg($glassurl);
$frameimg = imagecreatefromgif($frameurl);
$handleimg = imagecreatefrompng($handleurl);
$handleimg2 = imagecreatefrompng($handleurl2);
$frame_x = imagesx($frameimg);
$frame_y = imagesy($frameimg);
imagecopymerge($glassimg, $frameimg, 0, 0, 0, 0, $frame_x, $frame_y, 100);
imagecolortransparent($handleimg, imagecolorat($handleimg, 0, 0));
imagecolortransparent($handleimg2, imagecolorat($handleimg2, 0, 0));
$handle_x = imagesx($handleimg);
$handle_y = imagesy($handleimg);
imagecopymerge($glassimg, $handleimg, 460, 150, 0, 0, $handle_x, $handle_y, 100);
$handle2_x = imagesx($handleimg2);
$handle2_y = imagesy($handleimg2);
imagecopymerge($glassimg, $handleimg2, 5, 5, 0, 0, $handle2_x, $handle2_y, 100);
// Output and free from memory
imagepng($glassimg, "uploads/$filename.png");
imagedestroy($glassimg);
imagedestroy($frameimg);
imagedestroy($handleimg);
imagedestroy($handleimg2);
It pretty much works perfectly, however there is a slight issue. The helpbutton.png which is just a placeholder image to see that i can position images and merge them ends up with a solid black drop shadow that causes the image to look horrible.
This is what it should look like:
This is how it comes out once merged:
I have looked into a lot of the image controls including blending and such, but none seem to affect it. Does anyone know how to control that drop shadow shouldn't be darkened in PHP?