Forum Moderators: coopster

Message Too Old, No Replies

image layering using php

         

lindajames

1:23 am on Mar 29, 2005 (gmt 0)

10+ Year Member



hi, can anyone tell me if its possible to take lets say two different image files and use one as a background image and then add the other as a layer on top of the background one?

for example: lets say i have background.jpg and layer1.jpg and i want to add layer1.jpg on top of background.jpg with a multiply effect so that they both get mixed as an image.

can anyone tell me the ways this can be achieved as well as positioning the layer1.jpg picture.

thank you for your help

ironik

5:11 am on Mar 29, 2005 (gmt 0)

10+ Year Member



You can achieve this by using the GD library functions (provided by default in later versions of PHP, or available as a downloadable modular library for earlier versions).

Basically you'll want to use PNG images (support for transparency), and do a search for 'GD library tutorials' in a search engine. I don't have any code off the top of my head, although I've done it before and it works nicely... very useful for watermarking images.