php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #13197 ImageTTFText broken on truecolor images
Submitted: 2001-09-07 12:09 UTC Modified: 2001-11-19 11:09 UTC
From: jeremy at deadbeef dot com Assigned:
Status: Not a bug Package: GD related
PHP Version: 4.0.6 OS: Linux
Private report: No CVE-ID: None
 [2001-09-07 12:09 UTC] jeremy at deadbeef dot com
The resulting image is blank, works fine for palette images.



$img = ImageCreateTrueColor(300, 300);
$black = ImageColorAllocate ($img, 0, 0, 0);
$white = ImageColorAllocate ($img, 255, 255, 255);
ImageTTFText ($img, 40, 0, 20, ImageSY($img)-20, -$white, "/home/sageconspiracy/lib/fonts/bio.ttf", "TextText");
ImageJPEG($img, "", 50);

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2001-11-19 11:09 UTC] rasmus@php.net
Remove the - in front of $white there in your ImageTTFText() call and you should see something.  There is a known issue with anti-aliased ttf text on truecolor images in gd-2.0.1.  Hopefully this will be fixed in gd-2.0.2, but regardless, it is not a PHP bug.
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Thu Mar 28 12:01:27 2024 UTC