How can I add text to an image?



How can I add text to an image? ..

Answer / 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

More PHP Interview Questions

Is php a backend?

0 Answers  


What is the use of "echo" in php?

0 Answers  


What is the difference between Reply-to and Return-path in the headers of a mail function?

2 Answers  


Tell me what type of operation is needed when passing values through a form or an url?

0 Answers  


How can we extract string ‘abc.com ‘ from a string info@abc.com" target="_blank">http://info@abc.com using regular expression of php?

6 Answers  


What are encryption functions in php?

0 Answers  


How many columns can be added in a table in mysql?

0 Answers  


How can we extract string 'abc.com' from a string "http://info@abc.com" using regular expression of PHP

6 Answers   Wipro,


Tell me what is the use of mysql_real_escape_string() function?

0 Answers  


What is the Pipe Symbol represented?

0 Answers  


Why using the htaccess file

2 Answers  


How to enable cURL in PHP?

0 Answers   HCL,


Categories