View unanswered posts | View active topics It is currently Sun Oct 02, 2022 12:17 am



Reply to topic  [ 2 posts ] 
 Fatal Error when trying to create Images 
Author Message
Junior Member

Joined: Fri May 14, 2004 5:52 pm
Posts: 11
Post 
Hi Guys,

I m tryin to create images using PHP 4.3.4. I get a buncha warnings and the error msg :

Fatal error: Call to undefined function: imagegif() in e:\inetpub\wwwroot\php_misc\graphic.php on line 17


Here is the sample code :

Code:
<?php
Header("Content-type: image/gif");
if(!isset($s)) $s=11;
$size = imagettfbbox($s,0,"/fonts/TIMES.TTF",$text);
$dx = abs($size[2]-$size[0]);
$dy = abs($size[5]-$size[3]);
$xpad=9;
$ypad=9;
$im = imagecreate($dx+$xpad,$dy+$ypad);
$blue = ImageColorAllocate($im, 0x2c,0x6D,0xAF);
$black = ImageColorAllocate($im, 0,0,0);
$white = ImageColorAllocate($im, 255,255,255);
ImageRectangle($im,0,0,$dx+$xpad-1,$dy+$ypad-1,$black);
ImageRectangle($im,0,0,$dx+$xpad,$dy+$ypad,$white);
ImageTTFText($im, $s, 0, (int)($xpad/2)+1, $dy+(int)($ypad/2), $black, "/fonts/TIMES.TTF", $text);
ImageTTFText($im, $s, 0, (int)($xpad/2), $dy+(int)($ypad/2)-1, $white, "/fonts/TIMES.TTF", $text);
ImageGif($im);
ImageDestroy($im);
?>


what do u guys think?

Thanks,
mishmia


Wed Jun 02, 2004 10:57 am
Report this post
Profile
Junior Member

Joined: Fri May 14, 2004 5:52 pm
Posts: 11
Post 
Thanks,

The link is very useful.
Will try more :)

Mishmia


Wed Jun 02, 2004 2:42 pm
Report this post
Profile
Display posts from previous:  Sort by  
Reply to topic   [ 2 posts ] 

Who is online

Users browsing this forum: No registered users and 0 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
cron
© Copyright 2003-2008 www.php-editors.com. The ultimate PHP Editor and PHP IDE site.