note 101757 added to function.imagejpeg

From: Date: Sun, 09 Jan 2011 19:18:59 +0000
Subject: note 101757 added to function.imagejpeg
Groups: php.notes 
Request: Send a blank email to php-notes+get-175584@lists.php.net to get a copy of this message
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. ---- Server IP: 69.147.83.197 Probable Submitter: 85.74.103.6 ---- Manual Page -- http://www.php.net/manual/en/function.imagejpeg.php Edit -- https://master.php.net/note/edit/101757 Del: integrated -- https://master.php.net/note/delete/101757/integrated Del: useless -- https://master.php.net/note/delete/101757/useless Del: bad code -- https://master.php.net/note/delete/101757/bad+code Del: spam -- https://master.php.net/note/delete/101757/spam Del: non-english -- https://master.php.net/note/delete/101757/non-english Del: in docs -- https://master.php.net/note/delete/101757/in+docs Del: other reasons-- https://master.php.net/note/delete/101757 Reject -- https://master.php.net/note/reject/101757 Search -- https://master.php.net/manage/user-notes.php

« previous php.notes (#175584) next »