How to print a text on a image using PHP as watermark?

General discussion on PHP

How to print a text on a image using PHP as watermark?

Postby ashi4275 on Mon Aug 01, 2016 11:25 am

Hi, i am looking for some example code that help me to learn how to print the text over a image as a water mark. Hoping for valuable suggestions.
ashi4275
 
Posts: 15
Joined: Fri Jul 15, 2016 10:02 am

Re: How to print a text on a image using PHP as watermark?

Postby zvika on Sun Aug 21, 2016 1:44 pm

You usually use a library for that, which renders fonts and text + params onto an image object and renders the result to send back to the browser.
http://php.net/manual/en/function.imagettftext.php

Please google "add text to image with php" for examples.
Zvika Dror
Zend Support Team
User avatar
zvika
Zend Global Support
 
Posts: 992
Joined: Sun Dec 14, 2008 9:48 am

Re: How to print a text on a image using PHP as watermark?

Postby rob6279 on Tue Mar 20, 2018 11:59 am

It worked. Thanks for the link.
rob6279
 
Posts: 5
Joined: Tue Mar 20, 2018 11:44 am

Re: How to print a text on a image using PHP as watermark?

Postby glen755 on Fri Apr 13, 2018 8:12 am

For your general enlightenment: The accompanying drop-in capacity will put a piece of completely advocated content onto a GD picture. It is a little CPU substantial, so I recommend reserving the yield as opposed to doing it on-the-fly.
glen755
 
Posts: 1
Joined: Fri Apr 13, 2018 8:03 am


Return to PHP

Who is online

Users browsing this forum: No registered users and 2 guests