php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #33590 imagecreatefromjpeg(): gd-jpeg: JPEG library reports unrecoverable error
Submitted: 2005-07-06 15:38 UTC Modified: 2005-07-06 16:13 UTC
From: jeck at kntel dot kiev dot ua Assigned: pajoye (profile)
Status: Not a bug Package: GD related
PHP Version: 4.3.11 OS: FreeBSD 5.4-RELEASE
Private report: No CVE-ID: None
 [2005-07-06 15:38 UTC] jeck at kntel dot kiev dot ua
Description:
------------
Hi, just trying to copy images from one server to other but resize them.
I try to grab them using imagecreatefromjpeg(HTTP_IMG_URL), but somehow got an error line like this "Warning: imagecreatefromjpeg(): gd-jpeg: JPEG library reports unrecoverable error"...
One more thing - i trying to resize not one picture but ~65000 in a loop, maybe this fact has importance...

Reproduce code:
---------------
//... some calculation code
$img_src = imagecreatefromjpeg($http_img_url);
$img_dst = imagecreatetruecolor(100, 100);
// $start_x, $start_y, $width, $height, $iwidth, $height -
// calculated above
imagecopyresampled($img_dst, $img_src, $start_x, $start_y, 0, 0, $width, $height, $iwidth, $height);
imagejpeg($img_dst, $g_dstfile);
imagedestroy($img_dst);
// ... some insignificant code, and of function

Expected result:
----------------
just resized copy of image


Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2005-07-06 15:48 UTC] pajoye@php.net
Please give us one image that causes this problem. Copy a link to it here.


--Pierre
 [2005-07-06 15:53 UTC] jeck at kntel dot kiev dot ua
http://www.ix.nu/data/filestorage/gallery/49/49IkarlekYC.jpg

//sorry about content of this image, but this is it...
 [2005-07-06 16:13 UTC] pajoye@php.net
Sorry, but your problem does not imply a bug in PHP itself.  For a
list of more appropriate places to ask for help using PHP, please
visit http://www.php.net/support.php as this bug system is not the
appropriate forum for asking support questions.  Due to the volume
of reports we can not explain in detail here why your report is not
a bug.  The support channels will be able to provide an explanation
for you.

Thank you for your interest in PHP.

This image works here. 

If you are really trying to resize 65000 images in one shot, you may consider other solutions. This is the worst thing to do.

If you have other images which failed to be open with imagejpeg, please provide them here and put this bug back to open.

--Pierre
 [2011-08-20 06:19 UTC] karishma5july at gmail dot com
Hi, i am also facing this kind of issue.My code is suceessfully re size all the image but one image had occurred a problem with----
Warning: imagecreatefromjpeg() [function.imagecreatefromjpeg]: gd-jpeg: JPEG library reports unrecoverable error
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Fri Apr 19 21:01:30 2024 UTC