How to include an image inside another image in PHP?

谁说我不能喝 提交于 2019-12-31 01:06:08

问题


How to include an image inside another image in PHP? I want to do it like in twitterbackgrounds.com personalized backgroud. there is one main image and we can upload four personal images after that it will show as watermark of the main image.


回答1:


Well, there are several possibilies to do that. The one that pops into my mind is to use a php page where you can upload all files needed for this. After submission you can use imagemagick to create the new image with watermarks and display it on another webpage or store it to a database.

Here is a good tutorial on how to use imagemagick to create the watermarks in another image.

you may use imagemagick as commandline command from php or use it as a server application on an own server




回答2:


I never used GD by myself, but look at the example in the manual, wich is about "Using imagecopymerge() to create a translucent watermark".




回答3:


phpThumb has a watermark feature, if you're looking for something full-featured and ready-made..



来源:https://stackoverflow.com/questions/3003702/how-to-include-an-image-inside-another-image-in-php

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!