onlyican Posted August 22, 2006 Share Posted August 22, 2006 I asked the other day, and did not get the responce I want.SituationI have 3 images, I want to "Merge" ThemImage1 = BackgroundImage2 = Top of buildingImage3 = People from topI want to add image 2 and 3 into image 1 using PHP (NOT CSS)So say Image1 is 50px X 50pxImage2 and Image3 is 10x10pxI want to place Image 2 onto image 1 at pixle location 20 20and Image 3 onto Image 1 at pixle Location 40,40Any Ideas what function can be usedI dont want someone to say check php.net for the GD lib functionsI done that, none mention this, but I know one does this. Cant remember what one?Thanks all in advance Quote Link to comment Share on other sites More sharing options...
Barand Posted August 22, 2006 Share Posted August 22, 2006 http://www.php.net/imagecopymerge Quote Link to comment Share on other sites More sharing options...
onlyican Posted August 22, 2006 Author Share Posted August 22, 2006 Many ThanksI think I got it[code]<?php$flag = imagecreatefromjpeg('bground.jpg');$mask = imagecreatefromjpeg('building.jpg');imagealphablending($flag, 1);imagealphablending($mask, 1);imagecopy($flag, $mask, 10,10,0,0,25,43);imagecopy($flag, $mask, 50,50,0,0,25,43);imagecopy($flag, $mask, 150,50,0,0,25,43);imagecopy($flag, $mask, 350,150,0,0,25,43);imagecopy($flag, $mask, 450,450,0,0,25,43);header("Content-type: image/jpeg");imagejpeg($flag);?>[/code] Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.