Hello. I am clueless on how to do something like this in PHP. I have a 100x50 Pixel Background Image (bg.gif). I have two 50x50 Pixel Thumbnails (1.gif, 2.gif). How do I put the two thumbnails side by side on the background image? Any help would be appreciated.
This is not PHP related, but HTML only. try something like this: <!-- style def. --> .styling { background-image: url(images/bg.gif); background-repeat: no-repeat; background-position: left center; } <TABLE CLASS="styling"> <tr height="height of BG"> <td width="half width of bg"> <img src="images/1.gif"> </td> <td width="half width of bg"> <img src="images/2.gif"> </td> </tr> </table> HTML: hope this works for you.
I know how to do that, lol. However I want it to be one image so people can link to it. Like: <img src="finalimage.gif"> Code (markup):
Would you care to try something like: // fusioned image $bg = imageCreateFromGIF("bg.gif"); // the 2 thumbs $Img1 = imageCreateFromGIF("1.GIF"); $Img2 = imageCreateFromGIF("2.GIF"); //copy side by side imageCopyMerge($bg, $Img1, 0, 0, 0, 0, 50, 50, 0); imageCopyMerge($bg, $Img2, 51, 0, 0, 0, 50, 50, 0); //save the new image header("Content-type: image/jpg"); ImageJPEG($bg,"",100); PHP: I did no try it but in theory this should do the job. Give me some feedback.