Images with text | PHP
(MSBTE) Q.Write a program to display Text in an Image in PHP.
The imagestring() function is an inbuilt function in PHP which is used to draw the string horizontally. This function draws the string at given position.
Syntax :
bool imagestring( $image, $font, $x, $y, $string, $color)
where,
ลimage : The imagecreate or imagecreatetruecolor() function is used to create an image in a given size.
$font: This parameter is used to set the font size. The inbuilt font in Latin 2 encoding can be 1, 2, 3, 4, 5, or other font identifiers registered with imageloadfont) function.
$x: This parameter is used to hold the x-coordinate of the upper left corner.
$y: This parameter is used to hold the y-coordinate of the upper left corner
$string : This parameter is used to hold the string to be written.
$color : This parameter is used to hold the color of image.
Example:
Comments
Post a Comment
If you have any query, please let us know