|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2006-01-09 19:08 UTC] tony2001@php.net
[2006-01-09 23:03 UTC] pajoye@php.net
[2006-01-10 21:49 UTC] pierremarie dot guillot at wanadoo dot fr
[2006-01-10 23:33 UTC] sniper@php.net
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Sat Oct 25 08:00:01 2025 UTC |
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