Re: [GD] Image errors

From: Date: Wed, 15 Jul 2009 09:52:02 +0000
Subject: Re: [GD] Image errors
References: 1 2 3 4 5 6 7 8  Groups: php.general 
Request: Send a blank email to php-general+get-295404@lists.php.net to get a copy of this message
Martin Scotta wrote: > Why are you ussing GD? > All you need is output the image to the browser? > > try this... I didn't test/run this code, but it may work... > > public function showPicture( $id ) { > header('Content-type:' . mime_content_type( $this->updir . $id . > '.png' ) ); > readfile( $this->updir . $id . '.png' ); > } > > hey, look, just 2 lines! > But it doesn't convert the image from whatever came in to a JPEG output, which is what the OP's code appears to be trying to do (and possibly ought to work...) -- Peter Ford phone: 01580 893333 Developer fax: 01580 893399 Justcroft International Ltd., Staplehurst, Kent

« previous php.general (#295404) next »