note 99793 modified in function.imagecreatefromjpeg by danbrown
| From: | danbrown@php.net | Date: | Tue, 07 Sep 2010 14:45:06 +0000 |
| Subject: | note 99793 modified in function.imagecreatefromjpeg by danbrown | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-172360@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.
--was--
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
http://php.net/manual/en/function.imagecreatefromjpeg.php