Bug #14116 Updated: imageTTFtext doesnt work with ImageCreateTrueColor

From: Date: Mon, 19 Nov 2001 17:12:00 +0000
Subject: Bug #14116 Updated: imageTTFtext doesnt work with ImageCreateTrueColor
References: 1  Groups: php.dev 
Request: Send a blank email to php-dev+get-70943@lists.php.net to get a copy of this message
ID: 14116 Updated by: bate Reported By: luke@centre.net.au Old Status: Open Status: Bogus Bug Type: GD related Operating System: Slackware 8 PHP Version: 4.0.6 New Comment: I say don't use Beta Software. GD-2.0.1 are beta and buggy. It's not a PHP Problem. Use GD-1.8.4. Previous Comments: ------------------------------------------------------------------------ [2001-11-19 11:01:08] luke@centre.net.au Looks like im getting the same problem to Jeremy BUG-ID 13197. ------------------------------------------------------------------------ [2001-11-19 10:56:22] luke@centre.net.au <?php $fontsize=11; $angle=0; $fontfile="./pub/fonts/ARIAL.TTF"; $image = ImageCreateTrueColor(300, 16); $first=@imagecreatefromPNG("./pub/menuimg/$im1.png"); $white = imageColorAllocate($image, 255, 255, 255); $black = imageColorAllocate($image, 0, 0, 0); imageCopyResized($image,$first,1,0,0,0,ImageSX($first),ImageSY($first),ImageSX($first),ImageSY($first)); imagettftext($image, $fontsize, $angle, 23, 11, $black, $fontfile, "Main Page"); Header( "Content-type: image/png"); imagePNG($image); ImageDestroy ($image); ?> ------------------------------------------------------------------------ [2001-11-19 10:44:11] sander@php.net Can you post a sample script? You might be doing something wrong... ------------------------------------------------------------------------ [2001-11-19 10:40:33] luke@centre.net.au I am using: GD-2.0.1 FREETYPE-1.3.1 When I use the ImageCreate then the imageTTFtext works, streaming the image to the screen. If I use imageCreateTrueColor then the browse says "document contains no data". ------------------------------------------------------------------------ [2001-11-19 10:37:08] rasmus@php.net Luke, what do you mean by it doesn't work? There is a known problem with anti-aliasing of ttf fonts on truecolor images in gd-2.0.1, but apart from looking rather crappy, it does work. ------------------------------------------------------------------------ The remainder of the comments for this report are too long. To view the rest of the comments, please view the bug report online at http://bugs.php.net/?id=14116 Edit this bug report at http://bugs.php.net/?id=14116&edit=1

« previous php.dev (#70943) next »