ID: 31523 User updated by: schellekens at gmail dot com Reported By: schellekens at gmail dot com -Status: Feedback +Status: Open Bug Type: GD related Operating System: Windows XP Pro PHP Version: 4.3.9 New Comment:
hi again, here's an example script. also 2 versions of the same script. the wrong rendering using php 4.3.9 win32: http://www.europe-re.com/snd/incorrect.png the correct rendering using php 4.3.9 Debian: http://www.europe-re.com/snd/correct.png the script: <?php // ================================ // Parameters // ================================ $imgw = 200; $imgh = 20; $fcol = "000000"; $bcol = "e0e0e0"; $fsiz = 8; $ftxt = "Beware of weird foggy bibberish spam"; $xpos = 10; $ypos = 13; $ftyp = str_replace("\\", "/", getcwd()) . "/fonts/arial.ttf"; // font to use // ================================ // create from scratch // ================================ $imgd = ImageCreate ($imgw, $imgh); $bcol = ImageColorAllocate ($imgd, hexdec(substr($bcol, 0, 2)), hexdec(substr($bcol, 2, 2)), hexdec(substr($bcol, 4, 2))); $fcol = ImageColorAllocate ($imgd, hexdec(substr($fcol, 0, 2)), hexdec(substr($fcol, 2, 2)), hexdec(substr($fcol, 4, 2))); ImageFill ($imgd, 0, 0, $bcol); ImageTTFText ($imgd, $fsiz, $rota, $xpos+$xoff, $ypos, $fcol, $ftyp, $ftxt); // ================================ // Output het plaatje // ================================ header ("Content-type: image/png"); ImagePNG ($imgd); ImageDestroy ($imgd); exit(); ?> Previous Comments: ------------------------------------------------------------------------ [2005-01-14 04:54:12] [EMAIL PROTECTED] Thank you for this bug report. To properly diagnose the problem, we need a short but complete example script to be able to reproduce this bug ourselves. A proper reproducing script starts with <?php and ends with ?>, is max. 10-20 lines long and does not require any external resources such as databases, etc. If possible, make the script source available online and provide an URL to it here. Try avoid embedding huge scripts into the report. ------------------------------------------------------------------------ [2005-01-12 22:25:50] schellekens at gmail dot com Description: ------------ i noticed that in 4.3.9 for win32, rendering a text with ImageTTFText causes ugly character-spacing. rendering went better with version 4.3.3 which i used before. look at these differences: good (older)- http://www.europe-re.com/snd/right.png wrong (4.3.9) - http://www.europe-re.com/snd/wrong.png it may seem a minor detail but it just looks plain ugly now. i also tested on Apache/1.3.26 (Unix) Debian GNU/Linux PHP/4.3.9-1.dotdeb.3 which rendered correctly. Some info: - PHP Version 4.3.9 (windows binary) - Apache/1.3.28 (Win32) PHP/4.3.9 DAV/1.0.3-dev *** configure line missing in this windows build! *** GD Support enabled GD Version bundled (2.0.28 compatible) FreeType Support enabled FreeType Linkage with freetype GIF Read Support enabled GIF Create Support enabled JPG Support enabled PNG Support enabled WBMP Support enabled XBM Support enabled ------------------------------------------------------------------------ -- Edit this bug report at http://bugs.php.net/?id=31523&edit=1
