note 45744 added to function.imagettftext

From: Date: Thu, 16 Sep 2004 21:06:46 +0000
Subject: note 45744 added to function.imagettftext
Groups: php.notes 
Request: Send a blank email to php-notes+get-76847@lists.php.net to get a copy of this message
Hello! I have php 4.3.0 and GD2 library (and I use Xitami Server on Windows)... I tried to use following script: <?php header("Content-type: image/jpeg"); $im = imagecreate(400, 30); $white = imagecolorallocate($im, 255, 255, 255); $black = imagecolorallocate($im, 0, 0, 0); imagettftext($im, 20, 0, 10, 20, $black, "font.ttf", "Testing..."); imagejpeg($im); imagedestroy($im); ?> Internet Explorer displays this message: Warning: imagettftext() [function.imagettftext]: Could not find/open font in C:\PROGRAM FILES\XITAMI\webpages\adrian\ses.php on line 9 ÿØÿàJFIFÿþ>CREATOR: gd-jpeg v1.0 (using IJG JPEG v62), default quality (...) I used following code combinations but without any possitive results: imagettftext($im, 20, 0, 10, 20, $black, "font", "Testing..."); imagettftext($im, 20, 0, 10, 20, $black, "font.ttf", "Testing..."); imagettftext($im, 20, 0, 10, 20, $black, "C:\Program Files\Xitami\webpages\adrian\font.ttf", "Testing..."); imagettftext($im, 20, 0, 10, 20, $black, "http://localhost/adrian/font.ttf", "Testing..."); What can I do to display my php script correctly?? Should I have addictional libraries to use imagettftext function? Cheers for now! ---- Manual Page -- http://www.php.net/manual/en/function.imagettftext.php Edit -- http://master.php.net/manage/user-notes.php?action=edit+45744 Delete -- http://master.php.net/manage/user-notes.php?action=delete+45744&report=yes Reject -- http://master.php.net/manage/user-notes.php?action=reject+45744&report=yes Search -- http://master.php.net/manage/user-notes.php

« previous php.notes (#76847) next »