#21028 [Opn->Fbk]: Call to undefined function: imagettfbbox()
| From: | derick@php.net | Date: | Sun, 15 Dec 2002 16:59:19 +0000 |
| Subject: | #21028 [Opn->Fbk]: Call to undefined function: imagettfbbox() | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-27772@lists.php.net to get a copy of this message | ||
ID: 21028
Updated by: derick@php.net
Reported By: webmaster@alnadabi.net
-Status: Open
+Status: Feedback
Bug Type: GD related
Operating System: redhat 7.3
PHP Version: 4.2.3
New Comment:
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.
Previous Comments:
------------------------------------------------------------------------
[2002-12-15 10:58:42] webmaster@alnadabi.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
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/?id=21028&edit=1