imagettftext function

imagettftext function

This function is used to write the text to the image

Parameters to imagettftext
imagettftext ( int im, int size, int angle, int x, int y, int col, string fontfile, string text)

1. m - image resource
2. size - font size
3. angle - angle in which the character is drawn in degrees
4. X & y - (x,y) co-ordinates to draw the image
5. colour - The color to use for drawing the text.
6. fontfile - name of the font file
7. text - The Character to draw

Example:
$blue = imagecolorallocate($ih, 18, 18, 250);
imagettftext($ih, 8, 0, 10, 15, $blue, ‘arial.ttf’, “One”);

Leave a Reply

You must be logged in to post a comment.


All material @ copyrighted by chrisranjana.com. If you want to link to this article you are welcome to do so. Unauthorized publication is strictly prohibited. This developer tutorial website contains articles by Php programmers , Software developers, Mysql programmers and asp c# programmers. This website also contains ajax tutorials and advanced mysql sql stored procedures and functions tutorials and sample codes.