Edit report at https://bugs.php.net/bug.php?id=54940&edit=1
ID: 54940
Comment by: php at maisqi dot com
Reported by: php at maisqi dot com
Summary: Corrupt JPEG data: 200 extraneous bytes before
marker 0xc4
Status: Open
Type: Bug
Package: GD related
Operating System: Windows XP 32
PHP Version: 5.3.6
Block user comment: N
Private report: N
New Comment:
As with bug 39918, this can be solved with:
ini_set ('gd.jpeg_ignore_warning', 1);
Please close this entry. Sorry for the bogus.
Previous Comments:
------------------------------------------------------------------------
[2011-08-07 18:13:41] php at maisqi dot com
Hello? Anyone?
------------------------------------------------------------------------
[2011-05-27 14:13:59] php at maisqi dot com
Here's the JPEG: http://www.maisqi.com/954.jpg
------------------------------------------------------------------------
[2011-05-27 14:10:34] php at maisqi dot com
Description:
------------
I noticed that imagecreatefromjpeg() failed loading some JPEGs. I thought the
files were corrupt, but then I successfully opened them on The Gimp.
I noticed that if I opened one of those files on The Gimp and just saved it
(without doing any modifications), imagecreatefromjpeg() would open the saved
file with no problems.
So, It's clear that some JPEGs are a little different from the others and that
The Gimp fixes them on saving.
imagecreatefromjpeg() issues the following warnings:
Warning: imagecreatefromjpeg() [function.imagecreatefromjpeg]: gd-jpeg,
libjpeg: recoverable error: Corrupt JPEG data: 200 extraneous bytes before
marker 0xc4 in exp.php on line 3
Warning: imagecreatefromjpeg() [function.imagecreatefromjpeg]: '954.jpg' is not
a valid JPEG file in exp.php on line 3
PS: I've found bug 39918 similar to this. The problems seam to be related but
not the same. The first warnings looks like issued by a lower level function
and states that the error is recoverable.
Test script:
---------------
<?php
$fn = '954.jpg';
imagecreatefromjpeg ($fn);
Expected result:
----------------
No warnings.
Actual result:
--------------
It complains.
------------------------------------------------------------------------
--
Edit this bug report at https://bugs.php.net/bug.php?id=54940&edit=1