Now I'm going to teach you how to add a watermark to an image.
It is really easy.
It does like this:
First lets define our image where we want our watermark:
Now we need to check what kind of image is it and set it up for processing:
Now let's take our watermark:
Next is taking width and height of our image and our watermark:
And now is the time for the most important step, putting those images together:
If it's done, then we want to display our watermarked image:
Now when everything is done, let's destroy our images:
And we are done! If everything went well it should look like this:
Here's the full code:
I hope it helped you. If you have questions feel free to post a comment below.