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

How could I install codeignitor ?

1950


Where is php code written?

710


What are the string function in php?

726


in PHP for pdf which library used?

748


What is php limit?

712


Explain difference between urlencode and urldecode?

738


Tell me what is the default session time in php?

745


How to retrieve the original query string?

763


Under what circumstance is it impossible to assign a default value to a parameter while declaring a function?

934


Will a comparison of an integer 12 and a string "13" work in php?

729


What is beforeRender() used?

823


Why does php need server?

720


What is meant by pear in php? What is the purpose of it?

701


What is split function in php?

716


Explain me what are the 3 scope levels available in php and how would you define them?

949