views:

48

answers:

1

I am creating a Google Maps Social Application.. I have a basic marker that has a blank square in between it where I need to put the user uploaded picture.

I already have the user uploaded pictures. Now How do I create these dynamic markers using PHP.. The accepted pictures are jpeg and png.

I have heard of the PHP GD Library and would like to know how I can accomplish the task..

A: 

You can create the base image with this : imagecreatefromjpeg() & imagecreatefrompng() you can determine which one to use by getting the image information with getimagesize().

After you have your base image you can do the same with the user image and copy it to the base image with imagecopyresized()

You can see a couple of useful examples on the user comments at: php.net/imagecopyresized

I hope this answers your question, if not just ask me and I'll find the time to give you a more complete answer.

Lord Otori