Re: imagejpeg gives error

From: Date: Fri, 28 Mar 2003 03:42:36 +0000
Subject: Re: imagejpeg gives error
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-141360@lists.php.net to get a copy of this message
Well, check the error. Get rid of the header() call and just look at the output. On Thu, 27 Mar 2003, Reuben D. Budiardja wrote: > > Hello, > I have a script that creates image using the gd library that is bundled with > the latest php-4.0.3 on Redhat Linux / Apache as apache mod. Everything works > fine when I use png: > > header("Content-type: image/png"); > $im = imagecreate(500,500); > ...[script]... > imagepng($im) > > Then when I try to display it as jpeg by changing the header and the last line > as follows: > > header("Content-type: image/jpeg"); > $im = imagecreate(500,500); > ...[script]... > imagejpeg($im) > > It gives: > > The image "http://localhost/astr162/wedgeplot.php" > cannot be displayed, > because it contains errors. > > The question is, is the GD lib that is bundled with php has JPEG support ? > If yes, what might cause this error? > > Thanks a lot. Any help is appreciated. > RDB > > >

« previous php.general (#141360) next »