#27693 [NEW]: imagettftext() coupled with imagecreatetruecolor() displays yellow fonts.
| From: | xavier dot blanchet at free dot fr | Date: | Thu, 25 Mar 2004 13:49:36 +0000 |
| Subject: | #27693 [NEW]: imagettftext() coupled with imagecreatetruecolor() displays yellow fonts. | ||
| Groups: | php.bugs | ||
| Request: | Send a blank email to php-bugs+get-56808@lists.php.net to get a copy of this message | ||
From: xavier dot blanchet at free dot fr
Operating system: Linux
PHP version: 4.3.4
PHP Bug Type: GD related
Bug description: imagettftext() coupled with imagecreatetruecolor() displays yellow fonts.
Description:
------------
When we use the imagecreatetruecolor() function, the imagettftext() and a
TrueTypeFont with such a phpinfo():
http://240plan.ovh.net/test.php
The fonts expected in black display yellow, the other specified colors are
invisible.
Reproduce code:
---------------
<?php
DEFINE("TTF_DIR","path/to/fonts/");
$im = imagecreatetruecolor (400, 100);
$black = imagecolorallocate ($im, 0, 0, 0);
$white = imagecolorallocate ($im, 255, 255, 255);
imagefilledrectangle($im,0,0,399,99,$white);
imagettftext ($im, 30, 0, 10, 40, $black, TTF_DIR."arial.ttf", "Hello
World!");
header ("Content-type: image/png");
imagepng ($im);
?>
Expected result:
----------------
Hello World! should be written in black
Actual result:
--------------
Hello World! is written in yellow
--
Edit bug report at http://bugs.php.net/?id=27693&edit=1
--
Try a CVS snapshot (php4): http://bugs.php.net/fix.php?id=27693&r=trysnapshot4
Try a CVS snapshot (php5): http://bugs.php.net/fix.php?id=27693&r=trysnapshot5
Fixed in CVS: http://bugs.php.net/fix.php?id=27693&r=fixedcvs
Fixed in release: http://bugs.php.net/fix.php?id=27693&r=alreadyfixed
Need backtrace: http://bugs.php.net/fix.php?id=27693&r=needtrace
Need Reproduce Script: http://bugs.php.net/fix.php?id=27693&r=needscript
Try newer version: http://bugs.php.net/fix.php?id=27693&r=oldversion
Not developer issue: http://bugs.php.net/fix.php?id=27693&r=support
Expected behavior: http://bugs.php.net/fix.php?id=27693&r=notwrong
Not enough info: http://bugs.php.net/fix.php?id=27693&r=notenoughinfo
Submitted twice: http://bugs.php.net/fix.php?id=27693&r=submittedtwice
register_globals: http://bugs.php.net/fix.php?id=27693&r=globals
PHP 3 support discontinued: http://bugs.php.net/fix.php?id=27693&r=php3
Daylight Savings: http://bugs.php.net/fix.php?id=27693&r=dst
IIS Stability: http://bugs.php.net/fix.php?id=27693&r=isapi
Install GNU Sed: http://bugs.php.net/fix.php?id=27693&r=gnused
Floating point limitations: http://bugs.php.net/fix.php?id=27693&r=float