php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #35949 Bug with Panasonic and Exif
Submitted: 2006-01-09 18:54 UTC Modified: 2006-01-10 23:33 UTC
From: pierremarie dot guillot at wanadoo dot fr Assigned:
Status: Not a bug Package: EXIF related
PHP Version: 5.1.1 OS: Linux
Private report: No CVE-ID: None
 [2006-01-09 18:54 UTC] pierremarie dot guillot at wanadoo dot fr
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 : 
pierre@gunnm:~/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 

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2006-01-09 19:08 UTC] tony2001@php.net
Please try using this CVS snapshot:

  http://snaps.php.net/php5.1-latest.tar.gz
 
For Windows:
 
  http://snaps.php.net/win32/php5.1-win32-latest.zip


 [2006-01-09 23:03 UTC] pajoye@php.net
If you have a link to a couple of images with the relevant exif data, it will help to reproduce the problems, if it is not solved already.
 [2006-01-10 21:49 UTC] pierremarie dot guillot at wanadoo dot fr
Here ( http://guillot.pierremarie.free.fr/bug/index.html ) 
you can find two photos.
 [2006-01-10 23:33 UTC] sniper@php.net
Works fine when you really use the latest CVS snapshot.
 
PHP Copyright © 2001-2018 The PHP Group
All rights reserved.
Last updated: Mon Sep 24 11:01:25 2018 UTC