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

Explain me what is the meaning of a persistent cookie?

0 Answers  


How to find a specific value in an array?

0 Answers  


How do you check if a variable has been set in php?

0 Answers  


Is false empty php?

0 Answers  


What is the difference between html and php?

0 Answers  






Does php 7 support mysql?

0 Answers  


What language is php written in?

0 Answers  


What is the best way to avoid email sent through php getting into the spam folder?

0 Answers  


what is the default session expire time in php? what is default file attachment size in mail in php?

3 Answers  


How to compare two strings with comparison operators in php?

0 Answers  


What is meant by nl2br()?

3 Answers  


How long should a session last?

0 Answers  


Categories