Codeigniter Image Watermark

You can easily watermark images in CodeIgniter by using CI’s image manipulation class. In CI Watermarking is only available using the GD/GD2 library.

CI’s image manipulation library allows us to do image watermark in two ways with tiny configurations changes.

1. Text watermark.(wm_text)
2. Image over relay watermark.(wm_overlay_path)

Below is my Watermarkdemo controller, you will find both text and overlay examples in the controller.

That’s just need to pass the correct image, font and overlay image paths to config array Now you can point your browsers to http://yourDomain//watermarkdemo/overlay or http://yourDomain/index.php/watermarkdemo/overlay then check upload directory in the root.

By Arjun

I am Arjun from Hyderabad (India). I have been working as a software engineer from the last 7+ years, and it is my passion to learn new things and implement them as a practice. Aside from work, I like gardening and spending time with pets.

9 replies on “Codeigniter Image Watermark”

Hai Arjun, i want to get answer to one doubt about water marking. is it possible to remove water marking from an image using codeigniter? please reply

Your watermarking code is working fine for me. 🙂 I have one question, do you have the article of resizing image? I try to find in your website but I didn’t see it. Thanks in advance for your answer.

Hello Arjun. This post is awesome. I have successfully done it. Now i need to add rotational angle to the watermark text. I have done R&D on it. then i conclude that rotational angle is not added in image lib. How can i manually add in image library

Leave a Reply

Your email address will not be published. Required fields are marked *