note 99793 added to function.imagecreatefromjpeg

From: Date: Tue, 07 Sep 2010 07:41:59 +0000
Subject: note 99793 added to function.imagecreatefromjpeg
Groups: php.notes 
Request: Send a blank email to php-notes+get-172354@lists.php.net to get a copy of this message
I encountered a problem with this function on a windows system. Instead of returning false in case of the file not being a JPG, the function resulted in an error: "imagecreatefromjpeg() : gd-jpeg : JPEG library reports unrecoverable error". To get around this first check whether the file is a JPEG file using its mime type, if it is not return false. Here is a short article about it: http://tinyurl.com/3xd9h4x ---- Server IP: 69.147.83.197 Probable Submitter: 196.210.247.54 ---- Manual Page -- http://www.php.net/manual/en/function.imagecreatefromjpeg.php Edit -- https://master.php.net/note/edit/99793 Del: integrated -- https://master.php.net/note/delete/99793/integrated Del: useless -- https://master.php.net/note/delete/99793/useless Del: bad code -- https://master.php.net/note/delete/99793/bad+code Del: spam -- https://master.php.net/note/delete/99793/spam Del: non-english -- https://master.php.net/note/delete/99793/non-english Del: in docs -- https://master.php.net/note/delete/99793/in+docs Del: other reasons-- https://master.php.net/note/delete/99793 Reject -- https://master.php.net/note/reject/99793 Search -- https://master.php.net/manage/user-notes.php

« previous php.notes (#172354) next »