#35498 [NEW]: GD cannot open majority of jpeg images
| From: | paniemin at cc dot hut dot fi | Date: | Thu, 01 Dec 2005 00:18:26 +0000 |
| Subject: | #35498 [NEW]: GD cannot open majority of jpeg images | ||
| Groups: | php.bugs | ||
| Request: | Send a blank email to php-bugs+get-89540@lists.php.net to get a copy of this message | ||
From: paniemin at cc dot hut dot fi
Operating system: Redhat Linux 7.3
PHP version: 5.1.1
PHP Bug Type: GD related
Bug description: GD cannot open majority of jpeg images
Description:
------------
I tryed to upgrade from 5.0.4 to 5.1. I use blunded GD version with
freetype2, jpeg and png libraries. First I tried with old libraries that I
used to build 5.0.4. Next I downloaded new version from freetype2. Next I
downloaded GD 2.0.33 and tryed with it. I tried to find the problematic
part but I failed to locate it outside php :(
I found that imagecreatefromjpeg() fails to open jpeg files that older php
version opened without problems. The failure to open seems to be random but
about 60-70% images are 'corruped' for gd library.
here is one of corrupted images:
http://antin.net/imageshu/7363_1.jpg
I will continue searching the real reason for this bug. I hope someone
else can confirm same problem with 5.1 and GD.
Reproduce code:
---------------
$file = getFileForPerson($id, $imageNumber);
$img = imagecreatefromjpeg($file);
Expected result:
----------------
I excepted imagecreatefromjpeg to load the image so next steps in code can
manipulate it.
Actual result:
--------------
Warning: imagecreatefromjpeg() [function.imagecreatefromjpeg]: gd-jpeg:
JPEG library reports unrecoverable error: in
/home/customers/antin/public_html/huippu/ranki_dev.cgi on line 110
Warning: imagecreatefromjpeg() [function.imagecreatefromjpeg]:
'../imageshu/7363_1.jpg' is not a valid JPEG file in
/home/customers/antin/public_html/huippu/ranki_dev.cgi on line 110
With GD 2.0.33 the first warning is skipped which seems natural for me.
--
Edit bug report at http://bugs.php.net/?id=35498&edit=1
--
Try a CVS snapshot (PHP 4.4): http://bugs.php.net/fix.php?id=35498&r=trysnapshot44
Try a CVS snapshot (PHP 5.1): http://bugs.php.net/fix.php?id=35498&r=trysnapshot51
Try a CVS snapshot (PHP 6.0): http://bugs.php.net/fix.php?id=35498&r=trysnapshot60
Fixed in CVS: http://bugs.php.net/fix.php?id=35498&r=fixedcvs
Fixed in release: http://bugs.php.net/fix.php?id=35498&r=alreadyfixed
Need backtrace: http://bugs.php.net/fix.php?id=35498&r=needtrace
Need Reproduce Script: http://bugs.php.net/fix.php?id=35498&r=needscript
Try newer version: http://bugs.php.net/fix.php?id=35498&r=oldversion
Not developer issue: http://bugs.php.net/fix.php?id=35498&r=support
Expected behavior: http://bugs.php.net/fix.php?id=35498&r=notwrong
Not enough info: http://bugs.php.net/fix.php?id=35498&r=notenoughinfo
Submitted twice: http://bugs.php.net/fix.php?id=35498&r=submittedtwice
register_globals: http://bugs.php.net/fix.php?id=35498&r=globals
PHP 3 support discontinued: http://bugs.php.net/fix.php?id=35498&r=php3
Daylight Savings: http://bugs.php.net/fix.php?id=35498&r=dst
IIS Stability: http://bugs.php.net/fix.php?id=35498&r=isapi
Install GNU Sed: http://bugs.php.net/fix.php?id=35498&r=gnused
Floating point limitations: http://bugs.php.net/fix.php?id=35498&r=float
No Zend Extensions: http://bugs.php.net/fix.php?id=35498&r=nozend
MySQL Configuration Error: http://bugs.php.net/fix.php?id=35498&r=mysqlcfg