imagettfbbox() problem
Posted: Tue Nov 11, 2003 6:34 am
When running this script on my hosts server;
I get the error:
Fatal error: Call to undefined function: imagettfbbox() in C:\Webserver\apache\htdocs\vigge\source\image.php on line 18
GD Library is installed, and also Freetype 2, but what should my host do to make it work?
It works on my local server (ApacheFriends XAMPP for windows Version 1.0), but not on his.
Code: Select all
<?php
//Text to print
$txt = @$_GET['txt'];
if(empty($txt)) { $txt = "vigge89"; };
//Font settings
$font = "HOOG0550.ttf";
$fsize = "6";
$h = 7; //Height
//Center
$text_bbox = ImageTTFBBox ($fsize, 0, $font, $txt);
$img_width = $text_bbox[2]-$text_bbox[0] + 2 ;
//Create image
$im = imagecreate ($img_width, $h);
//Color setup
$r = @$_GET['r']; // Red
if(empty($r)) { $r = "255"; };
$g = @$_GET['g']; //Green
if(empty($g)) { $g = "255"; };
$b = @$_GET['b']; //Blue
if(empty($b)) { $b = "255"; };
//Set colors
$bc = ImageColorAllocate ($im, 0,0,0); //Background
$fc = ImageColorAllocate ($im, $r,$g,$b); //Text
//Write text from variables
ImageTTFText ($im, $fsize, 0, 1, 6, $fc, $font, $txt);
//Create image
header ("Content-type: image/png");
ImagePNG ($im);
?>Fatal error: Call to undefined function: imagettfbbox() in C:\Webserver\apache\htdocs\vigge\source\image.php on line 18
GD Library is installed, and also Freetype 2, but what should my host do to make it work?
It works on my local server (ApacheFriends XAMPP for windows Version 1.0), but not on his.