Bug #15568 Updated: ImageTTFText doesn't work in 4.1.1

From: Date: Mon, 25 Feb 2002 00:12:58 +0000
Subject: Bug #15568 Updated: ImageTTFText doesn't work in 4.1.1
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-981@lists.php.net to get a copy of this message
ID: 15568 Updated by: matt@zevi.net Reported By: reweiner@yahoo.com Status: Feedback Bug Type: GD related Operating System: Linux PHP Version: 4.1.1 New Comment: I have come across the same issue on Win2K running PHP4.1.1. The code worked in 4.0.6 though. The error message I am getting (if I comment out the ImagePNG line) is a strange one: Warning: ˜óO in (file) on line 6 Those funny characters (if you can see them) are what PHP outputs - they seem to be fairly random though - sometimes I get different funny characters. Previous Comments: ------------------------------------------------------------------------ [2002-02-21 17:25:15] taco@sun.com Remove the header line and take a look at the output. You will probably see the error now .... ------------------------------------------------------------------------ [2002-02-15 09:50:55] reweiner@yahoo.com No errors. Just a black square. ------------------------------------------------------------------------ [2002-02-15 09:37:36] mrobinso@php.net What error message do you get when running this code? ------------------------------------------------------------------------ [2002-02-15 09:21:14] reweiner@yahoo.com The following code works in 4.0.6 but doesn't in 4.1.1 Both are compiled with the same flags: --with-freetype --with-gd --with-ttf For 4.1.1 I added: --enable-gd-native-ttf --with-freetype-dir=/usr ( you need a font to test this. In this case - shelley.ttf ) <?php Header ("Content-type: image/png"); $im = imagecreate (400, 30); $black = ImageColorAllocate ($im, 0, 0, 0); $white = ImageColorAllocate ($im, 255, 255, 255); ImageTTFText ($im, 20, 0, 10, 20, $white, "shelley.ttf", "Testing... Omega: &#937;"); ImagePNG($im); ImageDestroy ($im); ?> ------------------------------------------------------------------------ -- Edit this bug report at http://bugs.php.net/?id=15568&edit=1

« previous php.bugs (#981) next »