Forum Moderators: coopster

Message Too Old, No Replies

Overlaying one image onto another

What function do I need?

         

bluedalmatian

3:20 am on Apr 3, 2005 (gmt 0)

10+ Year Member



I'm sure this is easy, if it isn't it should be, but I cant see a suitable function when I looked down the list.

I want to overlay one image onto another, starting at a particular xy offset?

Can anyone advise? Thanks

ergophobe

6:52 pm on Apr 3, 2005 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month



Do you have ImageMagick installed (most *nix machines do and it's free so you can install it on Windows too)?

Anyway, it's simple with IM (most things are simpler with IM than with GD in my limited experience with image manipulation).

[simplesystems.org...]

[cit.gu.edu.au...]

bluedalmatian

8:15 pm on Apr 3, 2005 (gmt 0)

10+ Year Member



Thanks for pointing that out, it looks good. Only problem is we havent got a hosting co yet so I dont know how easy it will be to find a server with support for it.

I take it then GD isnt capable of such a thing?

JAB Creations

8:31 pm on Apr 3, 2005 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



You should be using CSS not PHP to do image overlays.

<html>
<head>
<style>
img.top {
left: 50px;
position: absolute;
top: 120px;
z-index: 2;
}
img.bottom {
left: 80px;
position: absolute;
top: 50px;
z-index: 1;
}
</style>
</head>
<body>

<img src="http://images.google.com/images?q=tbn:HAZuzmkFySwJ:mechadiva.net/grfx/bjork.jpg" class="top">
<img src="http://images.google.com/images?q=tbn:HAZuzmkFySwJ:mechadiva.net/grfx/bjork.jpg" class="bottom">

</body>
</html>

bluedalmatian

4:36 pm on Apr 5, 2005 (gmt 0)

10+ Year Member



Brilliant thanks!