How to include image inside another image in PHP?

How to include image inside another image in PHP? I want to do this as a personalized backgroud on twitterbackgrounds.com. there is one main image, and we can upload four personal images, after which it will be displayed as a watermark of the main image.

+4
source share
3 answers

Well, there are several possibilities to do this. The one that appears in my head is using a php page where you can download all the files you need for this. After the submission, you can use imagemagick to create a new watermarked image and display it on another web page or save it to a database.

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

you can use imagemagick as a command line command from php or use it as a server application on your own server

+1
source

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

+2
source

phpThumb has a watermark function if you are looking for something fully functional and ready-made.

+1
source

Source: https://habr.com/ru/post/1312284/


All Articles