a1amattyj Posted April 20, 2012 Share Posted April 20, 2012 Hello, I've got 2 images (please see attached: top3.jpg, side4.jpt) (using these 2 as an example) I want to overlay them onto the image (also attached temp1.jpg) However, the corner gets cut off, as can be seen (temp3.jpg) Im wondering if I can overlay them using PHP at the 45deg angle? Currently using $dest = imagecreatefromjpeg($source); $src = imagecreatefromjpeg($image); if($part == 1) { // main image imagecopymerge($dest, $src, 0, 80, 0, 0, 321, 321, 100); } else if($part == 2) { // the top image imagecopymerge($dest, $src, 0, 0, 0, 0, 401, 80, 100); } else if($part == 3) { // the side image on the right imagecopymerge($dest, $src, 321, 1, 0, 0, 80, 401, 100); } imagejpeg($dest, $save); imagedestroy($dest); imagedestroy($src); Thank you! Link to comment https://forums.phpfreaks.com/topic/261331-overlaying-2-images-at-a-45deg-angle/ Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.