ID: 15568 Updated by: [EMAIL PROTECTED] Reported By: [EMAIL PROTECTED] 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] [EMAIL PROTECTED] Remove the header line and take a look at the output. You will probably see the error now .... ------------------------------------------------------------------------ [2002-02-15 09:50:55] [EMAIL PROTECTED] No errors. Just a black square. ------------------------------------------------------------------------ [2002-02-15 09:37:36] [EMAIL PROTECTED] What error message do you get when running this code? ------------------------------------------------------------------------ [2002-02-15 09:21:14] [EMAIL PROTECTED] 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: Ω"); ImagePNG($im); ImageDestroy ($im); ?> ------------------------------------------------------------------------ -- Edit this bug report at http://bugs.php.net/?id=15568&edit=1