note 101757 deleted from function.imagejpeg by danbrown

From: Date: Sun, 09 Jan 2011 19:36:00 +0000
Subject: note 101757 deleted from function.imagejpeg by danbrown
References: 1  Groups: php.notes 
Request: Send a blank email to php-notes+get-175585@lists.php.net to get a copy of this message
Note Submitter: tterranigma at yahoo dot com ---- I was constantly getting garbage instead of a photo while using imagejpeg() to directly output to the browser. (firefox 3.6 and chrome on ubuntu 10.10 using Xampp). Without headers I received garbage. With headers a url (text but when grabbing it with the mouse it was like an image. All these independent of the encoding of the html. What worked was only what a guy back in 2002 posted here: http://www.php.net/manual/en/function.imagejpeg.php#23510 . Do what he says and on the "makeimg.php" file don't put any headers at all. It will send the "garbage" to the img html tag which tag will force it into an image. If you try it without an external "makiimg.php" file it will not work.

« previous php.notes (#175585) next »