#27693 [Opn->Fbk]: imagettftext() coupled with imagecreatetruecolor() displays yellow fonts.

From: Date: Fri, 26 Mar 2004 20:01:58 +0000
Subject: #27693 [Opn->Fbk]: imagettftext() coupled with imagecreatetruecolor() displays yellow fonts.
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-56922@lists.php.net to get a copy of this message
ID: 27693 Updated by: iliaa@php.net Reported By: xavier dot blanchet at free dot fr -Status: Open +Status: Feedback Bug Type: GD related Operating System: Linux PHP Version: 4.3.4 New Comment: Works fine with latest CVS. Previous Comments: ------------------------------------------------------------------------ [2004-03-25 08:49:36] xavier dot blanchet at free dot fr 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 this bug report at http://bugs.php.net/?id=27693&edit=1

« previous php.bugs (#56922) next »