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

Php error constants and their descriptions

571


What is smarty?

491


What is reference variable php?

494


What are the functions to be used to get the image's properties (size, width and height)?

540


What does csrf token mean?

502






How to check your php installation?

498


What is the major php security hole? How to avoid?

538


Why do we need abstract class in php?

497


What is $_ request in php?

491


What is a static method php?

510


Is php used in 2019?

523


What is overloading and overriding in php?

545


Explain the difference between array_merge() and array_combine()?

527


Which function is used in php to search a particular value in an array?

498


Tell me what is the use of the function htmlentities?

506