nbarone Posted April 13, 2010 Share Posted April 13, 2010 I am trying to merge two images... the background image will have an overlay that is basically a border around the image... Here is my code, but it's only outputting the background image and not the overlay. <?php // define base image, this is the custom image $background = "../images/frontpage/fpgtest.png"; $overlay = "../images/assets/fpgraphic_overlay.png"; // create image $background = imagecreatefrompng($background); $overlay = imagecreatefrompng($overlay); // define colors $white = imagecolorallocate($background, 255, 255, 255); // transparent // apply trans color //imagealphablending($background, true); //imagesavealpha($background, true); //imagecolortransparent($background, $white); // define header header ("Content-type: image/png"); // Merge Image imagecopymerge($background,$overlay,0,0,0,0,0,0,100); // display image imagepng($background); imagedestroy($background); ?> Link to comment https://forums.phpfreaks.com/topic/198386-using-gd-to-merge-two-images-like-a-watermark/ Share on other sites More sharing options...
aeroswat Posted April 13, 2010 Share Posted April 13, 2010 I could be wrong but isn't that 100 you have on the end of your imagecopymerge the opacity? Link to comment https://forums.phpfreaks.com/topic/198386-using-gd-to-merge-two-images-like-a-watermark/#findComment-1041016 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.