Prashant Prashant - 3 months ago 9
PHP Question

PHP: How to draw an image over another image?

I am using PHP & GD library.

I want to draw an image (say this one: http://www.gravatar.com/avatar/107f2fafb2d29fedc3783b141139a878?s=128&d=identicon&r=PG) over another image: http://www.geekpedia.com/gallery/fullsize/simplistic-windows-wallpaper.jpg at specified coordinates (top-left or top-right or anywhere in the image).

How to do that using PHP and GD library.

Answer

imagecopy() or imagecopymerge(). It's documentation brings exemples too.