Place an image on top of another
Is there a way to place an image on the top of an other to produce one image?开发者_运维百科
imagecopy()
can do that
If you can get away with overlaying the images in your HTML, then just use CSS to position two <img>
tags on top of each other; the transparent (or semi-transparent) areas of the one on top will let the one behind show through. Easy.
However, if you actually want to output a single merged image (as your use of the 'gd' tag suggests), yes it can be done. You will need to write some code, of course!
Here is a link to pages which discusses how to do it. (there's quite a bit of discussion there, so it's easier to link to it than try to summarise it myself)
- http://codingforums.com/showthread.php?t=72317
精彩评论