PHP 4.0 Bug #4346: Suggestion for error trap in imagecreatefromjpeg
| From: | leon at leonatkinson dot com | Date: | Sun, 07 May 2000 20:29:03 +0000 |
| Subject: | PHP 4.0 Bug #4346: Suggestion for error trap in imagecreatefromjpeg | ||
| Groups: | php.dev | ||
| Request: | Send a blank email to php-dev+get-18511@lists.php.net to get a copy of this message | ||
From: leon@leonatkinson.com
Operating system: all
PHP version: 4.0 Release Candidate 1
PHP Bug Type: Feature/Change Request
Bug description: Suggestion for error trap in imagecreatefromjpeg
Here's a fun bug. I have a script that loads a JPEG with imagecreatefromjpeg and then sends it
directly to the browser. No error from PHP, and it really was returning a resource, but when I
called imagejpeg, it complained about an invalid resource. It took me about 15 minutes to realize
that while the image was there, it had been corrupted by being transfered in ftp's ASCII mode.
I don't know how practical it is because I haven't looked at the code, but it would be
nice for imagecreatefromjpeg to return an error when the JPEG is corrupt. Likewise with the rest of
the imagecreatefrom_ family.