Re: imagejpeg and downloading images

From: Date: Tue, 11 Mar 2003 16:47:28 +0000
Subject: Re: imagejpeg and downloading images
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-139140@lists.php.net to get a copy of this message
READ the manual. The snippet is correct but if you want to take advantage of the saving features of this function follow the function information at the top of the page. Jumping straight to the user snippets is a mistake as they are user contributed and may not document the whole function. int imagejpeg ( resource image [, string filename [, int quality]]) imagejpeg($im,'myfile.jpg',80); Doug Coning wrote:
Hi All, I'm using the following code to try to download images automatically from a directory: header('Content-Type: image/jpeg'); $im = imagecreatefromjpeg("001_SM77GR.jpg"); imagejpeg($im,'',85); imagedestroy($im); I copied this code from PHP.net. However, when I run the above code, it doesn't download the image, it just shows the image in the browser. I'm using IE 6 for my browser. How I get PHP to download this image? Thanks! Doug Coning


« previous php.general (#139140) next »