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
Welcome back! If you're the original bug submitter, here's where you can edit the bug or add additional notes.
If you forgot your password, you can retrieve your password here.
Password:
Status:
Package:
Bug Type:
Summary:
From: jeremy at deadbeef dot com
New email:
PHP Version: OS:

 

 [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

Pull Requests

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-2025 The PHP Group
All rights reserved.
Last updated: Fri May 09 12:01:28 2025 UTC