From:             pierremarie dot guillot at wanadoo dot fr
Operating system: Linux
PHP version:      5.1.1
PHP Bug Type:     EXIF related
Bug description:  Bug with Panasonic and Exif

Description:
------------
Hello,  
  
I'm running on Debian Linux and PHP version 5.0.5. The bug 
occurs with an earlier version too. 
I get a Panasonic (Lumix) DMC-FZ30 digital camera.  
I can read pictures from my camera with GIMP, I get exif  
data in Konqueror or with exif utility.  
However when I want to extract Exif data with PHP the  
exif_read_data function tell me that it's not unable to  
read my file.  
  
Thanks a lot for your work.  
Bye.  

Reproduce code:
---------------
<?php
echo "essai.jpg:<br />\n";
$exif = exif_read_data('essai.jpg', 'IFD0');
echo $exif===false ? "No header data found.<br />\n" : "Image contains
headers<br />\n";

$exif = exif_read_data('essai.jpg', 0, true);
echo "essai.jpg:<br />\n";
foreach ($exif as $key => $section) {
    foreach ($section as $name => $val) {
        echo "$key.$name: $val<br />\n";
    }
}
?>

Expected result:
----------------
Extracted data with exif utility : 
[EMAIL PROTECTED]:~/devel/web/myphoto/site$ exif essai.jpg 
EXIF tags in 'essai.jpg' ('Intel' byte order): 
--------------------+----------------------------------------------------------

Tag                 |Value 
--------------------+----------------------------------------------------------

Constructeur        |Panasonic 
Modèle              |DMC-FZ30 
Orientation         |haut - gauche 
x-résolution        |72,00 
y-résolution        |72,00 
Unité de la résoluti|pouces 
Logiciel            |Ver.1.0 
Date et heure       |2005:12:25 00:20:44 
Positionnement YCbCr|co-sited 
Compression         |Compression JPEG 
Orientation         |haut - gauche 
x-résolution        |72,00 
y-résolution        |72,00 
Unité de la résoluti|pouces 
Positionnement YCbCr|co-sited 
Temps d'exposition  |1/4 sec. 
FNumber             |f/3,2 
ExposureProgram     |Programme normal 
ISO Speed Ratings   |200 
Version d'exif      |Exif Version 2.2 
Date et heure (origi|2005:12:25 00:20:44 
Date et heure (numér|2005:12:25 00:20:44 
ComponentsConfigurat|Y Cb Cr - 
Bits compressés par |4,00 
Exposure Bias       |0,0 
MaxApertureValue    |3,00 
Mode de mesure      |Motif 
Source lumineuse    |0 
Flash               |Flash did not fire, compulsatory 
flash mode. 
Longueur focale     |13,8 mm 
Note du créateur    |5722 de données inconnues 
FlashPixVersion     |FlashPix Version 1.0 
Espace des couleurs |sRGB 
PixelXDimension     |3264 
PixelYDimension     |2448 
Sensing Method      |One-chip color area sensor 
Source du fichier   |DSC 
Type de scène       | 
Rendu personnalisé  |Processus normal 
Mode d'exposition   |Exposition automatique 
Balance des blancs  |Balance des blancs automatique 
Valeur du zoom numér|0,00 
Longueur focale dans|65 
Type de capture de l|Standard 
Contrôle du gain    |Low gain up 
Contraste           |Normal 
Saturation          |Normal 
Netteté             |Normal 
InteroperabilityInde|R98 
InteroperabilityVers| 
--------------------+----------------------------------------------------------

 

Actual result:
--------------
essai.jpg: 
  
 Warning: exif_read_data() [function.exif-read-data]: 
Unable to open file 
in /home/pierre/devel/web/myphoto/site/index.php on line 5 
 No header data found. 
  
 Warning: exif_read_data() [function.exif-read-data]: 
Unable to open file 
in /home/pierre/devel/web/myphoto/site/index.php on line 8 
 essai.jpg: 
  
 Warning: Invalid argument supplied for foreach() 
in /home/pierre/devel/web/myphoto/site/index.php on line 
10 

-- 
Edit bug report at http://bugs.php.net/?id=35949&edit=1
-- 
Try a CVS snapshot (PHP 4.4): 
http://bugs.php.net/fix.php?id=35949&r=trysnapshot44
Try a CVS snapshot (PHP 5.1): 
http://bugs.php.net/fix.php?id=35949&r=trysnapshot51
Try a CVS snapshot (PHP 6.0): 
http://bugs.php.net/fix.php?id=35949&r=trysnapshot60
Fixed in CVS:                 http://bugs.php.net/fix.php?id=35949&r=fixedcvs
Fixed in release:             
http://bugs.php.net/fix.php?id=35949&r=alreadyfixed
Need backtrace:               http://bugs.php.net/fix.php?id=35949&r=needtrace
Need Reproduce Script:        http://bugs.php.net/fix.php?id=35949&r=needscript
Try newer version:            http://bugs.php.net/fix.php?id=35949&r=oldversion
Not developer issue:          http://bugs.php.net/fix.php?id=35949&r=support
Expected behavior:            http://bugs.php.net/fix.php?id=35949&r=notwrong
Not enough info:              
http://bugs.php.net/fix.php?id=35949&r=notenoughinfo
Submitted twice:              
http://bugs.php.net/fix.php?id=35949&r=submittedtwice
register_globals:             http://bugs.php.net/fix.php?id=35949&r=globals
PHP 3 support discontinued:   http://bugs.php.net/fix.php?id=35949&r=php3
Daylight Savings:             http://bugs.php.net/fix.php?id=35949&r=dst
IIS Stability:                http://bugs.php.net/fix.php?id=35949&r=isapi
Install GNU Sed:              http://bugs.php.net/fix.php?id=35949&r=gnused
Floating point limitations:   http://bugs.php.net/fix.php?id=35949&r=float
No Zend Extensions:           http://bugs.php.net/fix.php?id=35949&r=nozend
MySQL Configuration Error:    http://bugs.php.net/fix.php?id=35949&r=mysqlcfg

Reply via email to