#31133 [NEW]: ImageFTText does the unexpected
| From: | hessefort dot marco at knauf dot de | Date: | Thu, 16 Dec 2004 18:40:56 +0000 |
| Subject: | #31133 [NEW]: ImageFTText does the unexpected | ||
| Groups: | php.bugs | ||
| Request: | Send a blank email to php-bugs+get-70390@lists.php.net to get a copy of this message | ||
From: hessefort dot marco at knauf dot de
Operating system: Windows 2000
PHP version: 5.0.3
PHP Bug Type: GD related
Bug description: ImageFTText does the unexpected
Description:
------------
This code produces a large white banner with "Testtext" on it when running
PHP4 or PHP5 up to 5.0.2
Exactly the same code with exactly the same machine config produces a
large white banner with nothing on it with 5.0.3.
lt_50196.tff is "Futura Condensed Bold". (copyrighted, unfortunately I
cannot offer it for download)
However, the code is working with "Arial.ttf" as font.
I can reproduce this behaviour on two machines, both running Win2k SP4
with IIS5 and Windows binaries downloaded from php.net in CGI Mode with
the bundled php_gd2.dll. Also running is FreeType 2.1.7
Don't know if it is a PHP "bug", but it's the only thing I changed.
Maybe related to Bug #17924.
Reproduce code:
---------------
<?php
dl('php_gd2.dll');
header ("Content-type: image/png");
$im = imagecreate(5000, 244);
$back = ImageColorAllocate($im, 255, 255, 255);
$fore = ImageColorAllocate($im, 0, 0, 0);
$retarr = ImageFTText ($im, 144, 0, 1, 189, $fore,
$_SERVER["SystemRoot"]."\\Fonts\\lt_50196.ttf", "Testtext", array());
ImagePng($im);
imagedestroy($im);
?>
Expected result:
----------------
Big fat "Testtext" with Font "Futura Condensed Bold" on a large white
rectangle.
Actual result:
--------------
Big fat nothing on a large white rectangle when running PHP 5.0.3
--
Edit bug report at http://bugs.php.net/?id=31133&edit=1
--
Try a CVS snapshot (php4): http://bugs.php.net/fix.php?id=31133&r=trysnapshot4
Try a CVS snapshot (php5.0): http://bugs.php.net/fix.php?id=31133&r=trysnapshot50
Try a CVS snapshot (php5.1): http://bugs.php.net/fix.php?id=31133&r=trysnapshot51
Fixed in CVS: http://bugs.php.net/fix.php?id=31133&r=fixedcvs
Fixed in release: http://bugs.php.net/fix.php?id=31133&r=alreadyfixed
Need backtrace: http://bugs.php.net/fix.php?id=31133&r=needtrace
Need Reproduce Script: http://bugs.php.net/fix.php?id=31133&r=needscript
Try newer version: http://bugs.php.net/fix.php?id=31133&r=oldversion
Not developer issue: http://bugs.php.net/fix.php?id=31133&r=support
Expected behavior: http://bugs.php.net/fix.php?id=31133&r=notwrong
Not enough info: http://bugs.php.net/fix.php?id=31133&r=notenoughinfo
Submitted twice: http://bugs.php.net/fix.php?id=31133&r=submittedtwice
register_globals: http://bugs.php.net/fix.php?id=31133&r=globals
PHP 3 support discontinued: http://bugs.php.net/fix.php?id=31133&r=php3
Daylight Savings: http://bugs.php.net/fix.php?id=31133&r=dst
IIS Stability: http://bugs.php.net/fix.php?id=31133&r=isapi
Install GNU Sed: http://bugs.php.net/fix.php?id=31133&r=gnused
Floating point limitations: http://bugs.php.net/fix.php?id=31133&r=float
No Zend Extensions: http://bugs.php.net/fix.php?id=31133&r=nozend
MySQL Configuration Error: http://bugs.php.net/fix.php?id=31133&r=mysqlcfg