开发者

Create Dynamic Images using Base Image

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 u开发者_JS百科ploaded 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..


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.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜