imagejpeg gives error

From: Date: Fri, 28 Mar 2003 03:52:29 +0000
Subject: imagejpeg gives error
Groups: php.general 
Request: Send a blank email to php-general+get-141359@lists.php.net to get a copy of this message
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 (#141359) next »