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
View Add Comment Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
You can add a comment by following this link or if you reported this bug, you can edit this bug over here.
(description)
Block user comment
Status: Assign to:
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

Add a Patch

Pull Requests

Add a Pull Request

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: Thu Apr 18 21:01:29 2024 UTC