php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Request #4346 Suggestion for error trap in imagecreatefromjpeg
Submitted: 2000-05-07 16:29 UTC Modified: 2002-03-22 19:08 UTC
From: leon at leonatkinson dot com Assigned:
Status: Not a bug Package: Feature/Change Request
PHP Version: 4.1.2 OS: all
Private report: No CVE-ID: None
Welcome back! If you're the original bug submitter, here's where you can edit the bug or add additional notes.
If you forgot your password, you can retrieve your password here.
Password:
Status:
Package:
Bug Type:
Summary:
From: leon at leonatkinson dot com
New email:
PHP Version: OS:

 

 [2000-05-07 16:29 UTC] leon at leonatkinson dot com
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.

Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2002-02-24 07:16 UTC] sander@php.net
Any change on this behaviour?
 [2002-03-22 18:58 UTC] leon at leonatkinson dot com
My suggested functionality definitely works for GIF.  I'm willing to assume it work the same with JPEG, PNG, etc...since they are all using GD, and because I'm too lazy to go recompile. :)
 [2002-03-22 19:08 UTC] derick@php.net
Not our problem, but a GD one.

Derick
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Sat Dec 21 17:01:58 2024 UTC