Re: [PHP4BETA] bug in gd list?
| From: | dave medvitz | Date: | Sun, 25 Jul 1999 17:44:55 +0000 |
| Subject: | Re: [PHP4BETA] bug in gd list? | ||
| References: | 1 | Groups: | php.version4 |
| Request: | Send a blank email to php-version4+get-2719@lists.php.net to get a copy of this message | ||
ZioBudda wrote:
>
> 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);
> ?>
>
I've got similar code, and am getting the same error. However, if I use
the secone parameter of ImageGif() to try to write the image to a file,
I get no error, and a pretty picture in a gif file.
Dave