php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #21960 Error when using ImageTTFText on ImageCreateTrueColor in GD 2.0
Submitted: 2003-01-30 03:54 UTC Modified: 2003-02-13 19:46 UTC
From: lorang at e-connect dot lu Assigned:
Status: No Feedback Package: GD related
PHP Version: 4.3.0 OS: Linux RedHat
Private report: No CVE-ID: None
 [2003-01-30 03:54 UTC] lorang at e-connect dot lu
When you create an image with ImageCreateTrueColor in GD 2.0.x and you try to write on that image with ImageTTFText, the text is not displayed.
This bug was already reported, and the possible solution was to use an older version of GD. I think when this BUG was reported, GD 2.0 was still beta. But not anymore, so !

Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2003-02-13 19:46 UTC] sniper@php.net
No feedback was provided. The bug is being suspended because
we assume that you are no longer experiencing the problem.
If this is not the case and you are able to provide the
information that was requested earlier, please do so and
change the status of the bug back to "Open". Thank you.


 [2003-10-17 12:41 UTC] php-devel at incense dot org
I found various people having problems with ImageTTFText() segfaulting when run under Apache. I was able to correct that with the following patch to GD (note: not PHP!)

--- gd-2.0.15.orig/gdft.c       Fri Oct 17 18:22:22 2003
+++ gd-2.0.15/gdft.c    Fri Oct 17 18:22:58 2003
@@ -761,7 +761,7 @@

 /* Persistent font cache until explicitly cleared */
 /*     Fonts can be used across multiple images */
-static gdCache_head_t *fontCache;
+static gdCache_head_t *fontCache = NULL;
 static FT_Library library;

 void
@@ -770,6 +770,7 @@
   if (fontCache)
     {
       gdCacheDelete (fontCache);
+      fontCache = NULL;
       FT_Done_FreeType (library);
     }
 }


Maybe that helps someone, so I'm posting it at the most accurate place I could find :-)
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Sat Dec 07 11:01:27 2024 UTC