Re: Problems producing an image

From: Date: Thu, 06 Dec 2001 03:41:32 +0000
Subject: Re: Problems producing an image
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-76826@lists.php.net to get a copy of this message
On Thu, 6 Dec 2001 13:50, Harshdeep S Jawanda wrote: > I am using the following code to try to produce a test image: > <? > //phpinfo(); > $gif = ImageCreate(200,200); > $bg = ImageColorAllocate($gif,0,0,0); > $tx = ImageColorAllocate($gif,255,128,128); > ImageFilledRectangle($gif,0,0,200,200,$bg); > ImageString($gif,3,70,90,"it works !",$tx); > > // send the image > header("content-type: image/jpeg"); > imagejpeg($gif); > ?> > > I am trying to display this image on the page > http://www.harshdeepjawanda.com/t2.html . > > Phpinfo() shows that PHP was compiled with: --with-gd, --with-jpeg-dir > and --with-png-dir, among others. Why then am I not able to see any > image? Try taking the header line out; that way if there is an error message you should be able to see it in 'View Source'. -- David Robley Techno-JoaT, Web Maintainer, Mail List Admin, etc CENTRE FOR INJURY STUDIES Flinders University, SOUTH AUSTRALIA Enter that again, just a little slower.

« previous php.general (#76826) next »