#30739 [Opn->Asn]: Writing on a Black BG

From: Date: Wed, 10 Nov 2004 08:40:48 +0000
Subject: #30739 [Opn->Asn]: Writing on a Black BG
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-68883@lists.php.net to get a copy of this message
ID: 30739 Updated by: tony2001@php.net Reported By: nate at highsocietyfreeride dot com -Status: Open +Status: Assigned Bug Type: GD related Operating System: apache? PHP Version: 4.3.10-dev -Assigned To: +Assigned To: pajoye Previous Comments: ------------------------------------------------------------------------ [2004-11-10 09:39:15] tony2001@php.net Confirmed with 4.3.10-dev, not reproducible with 5.0.x & 5.1.x branch. ------------------------------------------------------------------------ [2004-11-10 00:05:41] nate at highsocietyfreeride dot com Description: ------------ First off, I'm not sure what verison of PHP our servers use. My hosting service is IpowerWeb.com When I use imagettftext to write onto an image, it works fine, unless I allocate the color of 0,0,0. Even 1,1,1 works just fine. When I write to a complete black background the text shows up as rectangles, not the actual letters. The rectangles look like bounding boxes because they take the size of the actual letter its trying to print. Reproduce code: --------------- <?php $im_header = imagecreatetruecolor( 440, 83); $white = imagecolorallocate($im_header, 255, 255, 255); $black = imagecolorallocate($im_header, 0, 0, 0); imagefill($im_header,0,0,$black); imagecolortransparent($im_header, $black); imagettftext($im_header, 32, 0, 0, 42, $white, "fonts/verdana.TTF", "test"); imagejpeg($im_header); ?> ------------------------------------------------------------------------ -- Edit this bug report at http://bugs.php.net/?id=30739&edit=1

« previous php.bugs (#68883) next »