Re: [PHP] [GD] Image errors

2009-07-15 Thread Peter Ford
Ash, Martin, Seems you are both wandering around the obvious problem... I suspect that $tipo (in the next line) is *supposed* to be $type - sounds like a partial Italian translation to me... So given that $type=imagecreatefrompng (for example, if the mime check returns 'png' - not very

Re: [PHP] [GD] Image errors

2009-07-15 Thread Peter Ford
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(

Re: [PHP] [GD] Image errors

2009-07-14 Thread Martin Scotta
$immagine = $tipo($this-updir.$id.'.png'); $tipo is undefined On Tue, Jul 14, 2009 at 12:48 PM, Il pinguino volantetuxs...@codeinside.it wrote: Hi to all I get a problem processing an image with GD libraries. This is my function   public function showPicture($id) {      

Re: [PHP] [GD] Image errors

2009-07-14 Thread Ashley Sheridan
On Tue, 2009-07-14 at 13:27 -0300, Martin Scotta wrote: $immagine = $tipo($this-updir.$id.'.png'); $tipo is undefined On Tue, Jul 14, 2009 at 12:48 PM, Il pinguino volantetuxs...@codeinside.it wrote: Hi to all I get a problem processing an image with GD libraries. This is my

Re: [PHP] [GD] Image errors

2009-07-14 Thread Martin Scotta
He is calling the function by variable something like this $func = 'var_dump'; $func( new Foo ); On Tue, Jul 14, 2009 at 1:30 PM, Ashley Sheridana...@ashleysheridan.co.uk wrote: On Tue, 2009-07-14 at 13:27 -0300, Martin Scotta wrote: $immagine = $tipo($this-updir.$id.'.png'); $tipo is

Re: [PHP] [GD] Image errors

2009-07-14 Thread Ashley Sheridan
On Tue, 2009-07-14 at 13:41 -0300, Martin Scotta wrote: He is calling the function by variable something like this $func = 'var_dump'; $func( new Foo ); On Tue, Jul 14, 2009 at 1:30 PM, Ashley Sheridana...@ashleysheridan.co.uk wrote: On Tue, 2009-07-14 at 13:27 -0300, Martin Scotta

Re: [PHP] [GD] Image errors

2009-07-14 Thread Martin Scotta
On Tue, Jul 14, 2009 at 1:48 PM, Ashley Sheridana...@ashleysheridan.co.uk wrote: On Tue, 2009-07-14 at 13:41 -0300, Martin Scotta wrote: He is calling the function by variable something like this $func = 'var_dump'; $func( new Foo ); On Tue, Jul 14, 2009 at 1:30 PM, Ashley

Re: [PHP] [GD] Image errors

2009-07-14 Thread Ashley Sheridan
On Tue, 2009-07-14 at 14:16 -0300, Martin Scotta wrote: On Tue, Jul 14, 2009 at 1:48 PM, Ashley Sheridana...@ashleysheridan.co.uk wrote: On Tue, 2009-07-14 at 13:41 -0300, Martin Scotta wrote: He is calling the function by variable something like this $func = 'var_dump'; $func(

Re: [PHP] [GD] Image errors

2009-07-14 Thread Martin Scotta
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' );