How can I add text to an image?

Answer Posted / jude jeevanraj.p

There is a built in function to add text to an image. The
tricky bit is knowing the parameters.

It is not worth learning these, therefore take note of them
from an existing example or the manual each time that you
need to write text with PHP!

The function used to do this using TrueType fonts is called
imagettftext and take a deep breath as here come the
parameters:

array imagettftext ( resource $image, float $size, float
$angle, int $x, int $y, int $color, string $fontfile,
string $text )

Is This Answer Correct ?    4 Yes 1 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is string and its function?

760


How to pass variables by references?

750


How do I get csrf token?

753


Who developed php?

754


Explain what is meant by pear in php?

738


What is php and features of php?

669


What are php loops?

733


How can I increase my website session?

812


Write a program to find the factorial of a number in php?

751


Explain me what is the meaning of a persistent cookie?

682


How to get no of arguments passed to a PHP Function?

705


What is difference between Method overriding and overloading in PHP?

787


Require_once(), require(), include(). What is difference between them?

747


Explain the difference between require() and require_once()?

714


What does the unset() function mean?

822