php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #21028 Call to undefined function: imagettfbbox()
Submitted: 2002-12-15 10:58 UTC Modified: 2002-12-15 16:10 UTC
From: webmaster at alnadabi dot net Assigned:
Status: Not a bug Package: GD related
PHP Version: 4.2.3 OS: redhat 7.3
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: webmaster at alnadabi dot net
New email:
PHP Version: OS:

 

 [2002-12-15 10:58 UTC] webmaster at alnadabi dot net
I have already GD2 + Freetype2 installed in my machine

when i try to use the imagettfbbox() function , it's show that php cannot fine the required library for that function !! however when i used other image function , it's work fine with me ??

============ short script the reproduces the problem ======
<?php 

$imagewidth = 100; 
$imageheight = 20; 
$fontsize = 12; 
$myimg=ImageCreate($imagewidth, $imageheight); 
$col1=ImageColorAllocate($myimg, 255, 0, 0); 
$col2=ImageColorAllocate($myimg, 255, 255, 255); 
$thetextbox = ImageTTFBBox ($fontsize, 0, "TIMES.TTF", "My Button"); 
$textwidth = (($thetextbox[4] + $thetextbox[2]) / 2) - (($thetextbox[6] + $thetextbox[0]) / 2); 
$xpos = ($imagewidth - $textwidth) / 2; 
$ypos = 14; 
ImageTTFText ($myimg, $fontsize, 0, $xpos, $ypos, $col2, "./ttfonts/arialnb.ttf", "My Button"); 
ImagePNG($myimg, "myimg.png"); 
ImageDestroy($myimg); 
?> 
<img src="myimg.png" border=0>
================================================


any suggestions ??


Regards,
AlNadabi

Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2002-12-15 10:59 UTC] derick@php.net
Not enough information was provided for us to be able
to handle this bug. Please re-read the instructions at
http://bugs.php.net/how-to-report.php

If you can provide more information, feel free to add it
to this bug and change the status back to "Open".

Thank you for your interest in PHP.

 [2002-12-15 16:10 UTC] sniper@php.net
Sorry, but your problem does not imply a bug in PHP itself.  For a
list of more appropriate places to ask for help using PHP, please
visit http://www.php.net/support.php as this bug system is not the
appropriate forum for asking support questions. 

Thank you for your interest in PHP.
 
PHP Copyright © 2001-2025 The PHP Group
All rights reserved.
Last updated: Sun May 11 13:01:28 2025 UTC