Imagefttext does not display text
I am using a free pjp type library gd for one of the php applications,
used to put some text on top of images at runtime, it worked fine for quite some time now, but I made a few changes recently, after which it doesn't work correctly on most images. but on multiple images it shows correctly, however all images are of the same type (.gif).
but on vacation it shows a very broken text like this:
$imageId = imagecreatefromgif($imageUrl); $angle = 0; $xCord = 4; $yCord = 40; $imageColor = imagecolorallocate($imageId, 222, 0, 84); $fontUrl = "./Verdana.ttf"; $imageText = $firstName; $imageTextLnght = strlen($imageText); $fontSize = 25; $xCord = 4; imagefttext($imageId, $fontSize, $angle, $xCord, $yCord, $imageColor, $fontUrl, $imageText); $textImage = 'textImage.gif'; imagegif($imageId, $textImage); imagedestroy($imageId);
Please help me with this.
source to share
No one has answered this question yet
Check out similar questions: