Page 1 of 1

problem with ImageFontWidth method,

Posted: Thu Feb 07, 2008 5:33 am
by legolas.w
Hi
Thank you for reading my post
I am trying to install a php application and it return an error like:

Code: Select all

Fatal error: Call to undefined function ImageFontWidth() in /var/www/triner/includes/functions.php on line 28
the line 25 to 30 looks like:

Code: Select all

 
    ## create an image not a text for the pin
 
    $font  = 6;
 
    $width  = ImageFontWidth($font) * strlen($generated_pin);
 
    $height = ImageFontHeight($font);
 
 
    $im = @imagecreate ($width,$height);
 
    $background_color = imagecolorallocate ($im, 219, 239, 249); //cell background
 
    $text_color = imagecolorallocate ($im, 0, 0,0);//text color
 
 
 

Can some one please let me know what is the problem?

Thanks

Re: problem with ImageFontWidth method,

Posted: Thu Feb 07, 2008 12:35 pm
by Christopher
You probably don't have the Image extension installed. Check phpinfo() and the manual:

http://us2.php.net/manual/en/ref.image.php