From:             
Operating system: Windows XP 32
PHP version:      5.3.6
Package:          GD related
Bug Type:         Bug
Bug description:Corrupt JPEG data: 200 extraneous bytes before marker 0xc4

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 bug report at http://bugs.php.net/bug.php?id=54940&edit=1
-- 
Try a snapshot (PHP 5.2):            
http://bugs.php.net/fix.php?id=54940&r=trysnapshot52
Try a snapshot (PHP 5.3):            
http://bugs.php.net/fix.php?id=54940&r=trysnapshot53
Try a snapshot (trunk):              
http://bugs.php.net/fix.php?id=54940&r=trysnapshottrunk
Fixed in SVN:                        
http://bugs.php.net/fix.php?id=54940&r=fixed
Fixed in SVN and need be documented: 
http://bugs.php.net/fix.php?id=54940&r=needdocs
Fixed in release:                    
http://bugs.php.net/fix.php?id=54940&r=alreadyfixed
Need backtrace:                      
http://bugs.php.net/fix.php?id=54940&r=needtrace
Need Reproduce Script:               
http://bugs.php.net/fix.php?id=54940&r=needscript
Try newer version:                   
http://bugs.php.net/fix.php?id=54940&r=oldversion
Not developer issue:                 
http://bugs.php.net/fix.php?id=54940&r=support
Expected behavior:                   
http://bugs.php.net/fix.php?id=54940&r=notwrong
Not enough info:                     
http://bugs.php.net/fix.php?id=54940&r=notenoughinfo
Submitted twice:                     
http://bugs.php.net/fix.php?id=54940&r=submittedtwice
register_globals:                    
http://bugs.php.net/fix.php?id=54940&r=globals
PHP 4 support discontinued:          http://bugs.php.net/fix.php?id=54940&r=php4
Daylight Savings:                    http://bugs.php.net/fix.php?id=54940&r=dst
IIS Stability:                       
http://bugs.php.net/fix.php?id=54940&r=isapi
Install GNU Sed:                     
http://bugs.php.net/fix.php?id=54940&r=gnused
Floating point limitations:          
http://bugs.php.net/fix.php?id=54940&r=float
No Zend Extensions:                  
http://bugs.php.net/fix.php?id=54940&r=nozend
MySQL Configuration Error:           
http://bugs.php.net/fix.php?id=54940&r=mysqlcfg

Reply via email to