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
What is the difference between php and java?
What is difference between base_url and site_url?
What are some new features introduced in php7?
Are php short tags acceptable to use?
What is the best practice for running mysql queries in php? Consider the risk of sql injection.
How to create a directory?
What is the use of trim in php?
What is the difference between implode() and explode() in php?
What does type casting mean in php? Explain with an example?
Which function would you use to format date information in php?
How to find the position of the first occurrence of a substring in a string?
Is a number php?
What are the difference between array_keys() and array_key_exists() in php?
Is php pass by reference or value?
What is the best way to change the key without changing the value of a php array element?