[GD] Image errors

From: Date: Tue, 14 Jul 2009 15:48:41 +0000
Subject: [GD] Image errors
Groups: php.general 
Request: Send a blank email to php-general+get-295371@lists.php.net to get a copy of this message
Hi to all I get a problem processing an image with GD libraries. This is my function public function showPicture($id) {
       header('Content-type: image/jpeg');
       $mime = mime_content_type($this->updir.$id.'.png');
       $type = explode('/',$mime);
       $type = 'imagecreatefrom'.$type[1];
       $immagine = $tipo($this->updir.$id.'.png');
       imagejpeg($immagine,null,100);
       imagedestroy($immagine);
} If i commentize the "header" function i get a lot of strange simbols (such as the code of a jpeg image!) but no errors. The result of this code is a blank page. In Firefox the title sets to "picture.php (JPEG image)" and if i right-click it and click on "Proprieties" i get "0px × 0px (resized as 315px × 19px)". P.S.: I get the same result when I write $immagine = imagecreatefromjpeg(...) (Sorry for my english) Thanks in advance, Alfio.

« previous php.general (#295371) next »