php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #28492 imagettftext not displaying output
Submitted: 2004-05-22 18:36 UTC Modified: 2004-05-22 19:09 UTC
From: nimion at tripsoftware dot com Assigned:
Status: Not a bug Package: GD related
PHP Version: 4.3.4 OS: Linux
Private report: No CVE-ID: None
 [2004-05-22 18:36 UTC] nimion at tripsoftware dot com
Description:
------------
imagettftext is not producing any output, just a blank image.  I am using 4.3.4 with GD 2.0.12, and have tried everything to get it to at least report whats wrong (including giving it a blatently false font path, which still did not return errors). The same code works fine on my dev box (Windows 4.3.4 w/GD 2.0.22).

Reproduce code:
---------------
<?php
  $im = imagecreate(400, 400);
  $white = imagecolorallocate($im, 255, 255, 255);
  $black = imagecolorallocate($im, 0, 255, 0);
 
  // Replace path by your own font path
  $r = imagettftext($im, 20, 0, 10, 20, $black, "arial", "LET THERE BE LIGHT");
  
  imagejpeg($im);
  imagedestroy($im);
?> 

Expected result:
----------------
Text on an image.

Actual result:
--------------
Nothing.

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2004-05-22 19:09 UTC] derick@php.net
Thank you for taking the time to report a problem with PHP.
Unfortunately you are not using a current version of PHP -- 
the problem might already be fixed. Please download a new
PHP version from http://www.php.net/downloads.php

If you are able to reproduce the bug with one of the latest
versions of PHP, please change the PHP version on this bug report
to the version you tested and change the status back to "Open".
Again, thank you for your continued support of PHP.

Please try 4.3.6.
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Thu Mar 28 14:01:29 2024 UTC