#31797 [Opn]: exif_read_data reads very little data from what it used to read
| From: | shimi at shimi dot net | Date: | Tue, 01 Feb 2005 21:37:56 +0000 |
| Subject: | #31797 [Opn]: exif_read_data reads very little data from what it used to read | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-73211@lists.php.net to get a copy of this message | ||
ID: 31797
User updated by: shimi at shimi dot net
Reported By: shimi at shimi dot net
Status: Open
Bug Type: *Graphics related
Operating System: Linux
PHP Version: 4CVS-2005-02-01 (stable)
New Comment:
After digging around, I have a weird feeling that this bug is related
to the following "fix" in CVS:
http://cvs.php.net/diff.php/php-src/ext/exif/exif.c?r1=1.118.2.29&r2=1.118.2.30&ty=h
Previous Comments:
------------------------------------------------------------------------
[2005-02-01 22:05:20] shimi at shimi dot net
I see him not wanting to nest further, thus deciding that "the header
is bad". I tried it on numerous images, made by numerous cameras
(Nikon, Sony, Olympus) - in all of them I get the same error, the image
loads FINE, and other utilities (not PHP) _CAN_ read the missing data.
PHP could read it too in the past. This code worked, and it has not
been touched, and has now stopped working.
If you insist that the problem is on my end, can you please give me a
URL that EXIF DOES parse the EXIF data for correctly?
------------------------------------------------------------------------
[2005-02-01 21:52:07] sniper@php.net
Add 'error_reporting(E_ALL);' to your script:
PHP Warning: exif_read_data(82728697.jpg): corrupt EXIF header:
maximum directory nesting level reached in Command line code on line 1
Corrupted image -> no bug in PHP.
------------------------------------------------------------------------
[2005-02-01 21:42:47] shimi at shimi dot net
Description:
------------
I have a script that parses EXIF data from images, displaying them as a
new image (using GD) that contains the data. Lately (I am not sure when
exactly, but I suspect it was after upgrading to STABLE-CVS due to
fixing of the unserialize() bug I suffered badly from), it seems that
most of the important EXIF data is simply not read (like ExposureTime,
etc). I asked someone to verify that the image indeed has the details,
and it looks that it does. Here's a screenshot from his EXIF read:
http://uploaded.fresh.co.il/2005/02/01/76282133.png
Reproduce code:
---------------
$data=exif_read_data("http://uploaded.fresh.co.il/2005/01/23/82728697.jpg");
print_r($data);
Expected result:
----------------
See all EXIF data stored on file.
Actual result:
--------------
Only part of the EXIF is retrieved:
Array
(
[FileName] => 82728697.jpg
[FileDateTime] => 1106515041
[FileSize] => 102438
[FileType] => 2
[MimeType] => image/jpeg
[SectionsFound] => ANY_TAG, IFD0
[COMPUTED] => Array
(
[html] => width="494" height="616"
[Height] => 616
[Width] => 494
[IsColor] => 1
[ByteOrderMotorola] => 0
)
[ImageDescription] => OLYMPUS DIGITAL CAMERA
[Make] => OLYMPUS OPTICAL CO.,LTD
[Model] => C4100Z,C4000Z
[XResolution] => 72/1
[YResolution] => 72/1
[ResolutionUnit] => 2
)
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/?id=31797&edit=1