RE: [PHP4BETA] bug in gd list?

From: Date: Thu, 22 Jul 1999 16:18:56 +0000
Subject: RE: [PHP4BETA] bug in gd list?
References: 1  Groups: php.version4 
Request: Send a blank email to php-version4+get-2534@lists.php.net to get a copy of this message
Well..... ImageGif is missing a trailing semi-colon. When I comment out these two lines # $font = imageloadfont("/usr/lib/tk8.0/demos/images/face.bmp"); # ImageString($im,5,2,7,$count,$black); it works for me - but I don't know if I have those fonts; so try reducing the magic of those two lines until it works, or you find out whats up. Sam -----Original Message----- From: ZioBudda [mailto:michel@michel.enter.it] Sent: 22 July 1999 16:55 To: php4beta@lists.php.net Subject: [PHP4BETA] bug in gd list? Hi, this little code works (img.php3?count=123) with php3, but does not work with php4 (document contains no data). why? <? Header("Content-type: image/gif"); $s = 11; $lfont = imagefontwidth(5); $lunghezza = $lfont * strlen($count)+3; $im = ImageCreate($lunghezza,20); $blue = ImageColorAllocate($im, 0x2c,0x6D,0xAF); $black = ImageColorAllocate($im, 0,0,0); $white = ImageColorAllocate($im, 255,255,255); ImageFill($im,0,0,$white); $px = (imagesx($im)-7.5*strlen($count))/2; $font = imageloadfont("/usr/lib/tk8.0/demos/images/face.bmp"); ImageString($im,5,2,7,$count,$black); ImageGif($im) ImageDestroy($im); ?> Sul Grande Mazinger girava Linux, su Boss Robot un sistema operativo Microsoft. -- Michel <ZioBudda> Morelli michel@enter.it http://ziobudda.enter.it Italian Linux FAQ http://ziobudda.enter.it/FAQ/ -- PHP 4 Beta

« previous php.version4 (#2534) next »