|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
[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 ! PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Fri Nov 07 23:00:01 2025 UTC |
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 :-)