Bug #50845 [Com]: exif_read_data() returns corrupted exif headers

From: Date: Sun, 17 May 2015 08:43:26 +0000
Subject: Bug #50845 [Com]: exif_read_data() returns corrupted exif headers
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-192709@lists.php.net to get a copy of this message
Edit report at https://bugs.php.net/bug.php?id=50845&edit=1 ID: 50845 Comment by: steinsplitter-wiki at live dot com Reported by: zerkella at i dot ua Summary: exif_read_data() returns corrupted exif headers Status: Open Type: Bug Package: EXIF related Operating System: * PHP Version: 5.*, 6 Block user comment: N Private report: N New Comment: only for the record: https://phabricator.wikimedia.org/T97253 Previous Comments: ------------------------------------------------------------------------ [2010-01-26 10:53:42] zerkella at i dot ua Description: ------------ exif_read_data returns bad values for headers for some photos. Headers look like corrupted during extraction from file - like they were mixed with and overwritten by other exif headers. I tried to check Exif headers for same photos with XnView - it shows them nicely. So the problem is somewhere in php. Files to reproduce this bug: http://i.i.ua/php_bugs/62418.jpg http://i.i.ua/php_bugs/39908.jpg http://i.i.ua/php_bugs/21260.jpg Reproduce code: --------------- var_dump(exif_read_data('http://i.i.ua/php_bugs/62418.jpg', 'EXIF')); var_dump(exif_read_data('http://i.i.ua/php_bugs/39908.jpg', 'EXIF')); Expected result: ---------------- array(34) { ... ["Make"]=> string(11) "FUJI PHOTO FILM CO., LTD." ["Model"]=> string(7) "SLP800" ... ["Software"]=> string(3) "FDi V4.5 / FRONTIER330-3.0-0E-5" ... ["DateTimeOriginal"]=> string(11) "2005:08:04 12:05:55" ... } array(49) { ... ["ApertureFNumber"]=> string(12) "f8.0" ... ["Make"]=> string(4) "Canon" ["Model"]=> string(2) "Canon EOS DIGITAL REBEL" ... ["ExposureTime"]=> string(13) "6250/1000000" ["FNumber"]=> string(13) "8.0" ["DateTimeOriginal"]=> string(19) "2005:05:14 19:00:41" ... } Actual result: -------------- array(34) { ... ["Make"]=> string(11) "04 12:05:55" ["Model"]=> string(7) "M CO., " ... ["Software"]=> string(3) "TD." ... ["DateTimeOriginal"]=> string(11) "-3.0-0E-518" ... } array(49) { ... ["ApertureFNumber"]=> string(12) "f/74099368.0" ... ["Make"]=> string(4) "Exif" ["Model"]=> string(2) "I*" ... ["ExposureTime"]=> string(13) "1111490560/15" ["FNumber"]=> string(13) "1111490560/15" ["DateTimeOriginal"]=> NULL ... } ------------------------------------------------------------------------ -- Edit this bug report at https://bugs.php.net/bug.php?id=50845&edit=1

« previous php.bugs (#192709) next »