How to merge transparent PNG with image using PHP?

Spread the love

Question Description

The situation is this: I have a small 50×50 pic. I also have a small 50×50 transparent picture which contains a frame for the 50×50 pic, so I basically want to put the transparent png on top of the image and merge those two which would lead to a final third picture that looks something like this: http://img245.imageshack.us/i/50x50n.png

Note: I don’t want to do this using HTML only (I achieved this by writing a javascript plugin that put the transparent png on top of the original image).

Thanks.

Practice As Follows

You can merge the two images together using the PHP GD2 library.

Example:


Leave a Comment