Bug #72819 [NEW]: EXIF thumbnails not read anymore
From: php dot bohwaz at miam dot kd2 dot org
Operating system: Debian Linux Jessie
PHP version: 5.6.24
Package: EXIF related
Bug Type: Bug
Bug description:EXIF thumbnails not read anymore
Description:
------------
I am using PHP to extract thumbnails from JPEG files, and this used to
work fine, but I upgraded to PHP 5.6 (from 5.4) and now it seems that
exif_* functions are unable to find thumbnail data in every JPEG file
I'm trying.
Works:
$ php -v && php -r
'var_dump(strlen(exif_thumbnail("http://www.exiv2.org/include/img_1771.jpg")));'
PHP 5.4.45-0+deb7u4 (cli) (built: Jun 29 2016 14:51:18)
Copyright (c) 1997-2014 The PHP Group
Zend Engine v2.4.0, Copyright (c) 1998-2014 Zend Technologies
int(5448)
Doesn't work:
$ php -v && php -r
'var_dump(strlen(exif_thumbnail("http://www.exiv2.org/include/img_1771.jpg")));'
PHP 5.6.24-0+deb8u1 (cli) (built: Jul 26 2016 08:17:07)
Copyright (c) 1997-2016 The PHP Group
Zend Engine v2.6.0, Copyright (c) 1998-2016 Zend Technologies
with Zend OPcache v7.0.6-dev, Copyright (c) 1999-2016, by Zend
Technologies
PHP Warning: exif_thumbnail(img_1771.jpg): IFD data bad offset:
0xFFFFFC52 length 0x01C2 in Command line code on line 1
Warning: exif_thumbnail(img_1771.jpg): IFD data bad offset: 0xFFFFFC52
length 0x01C2 in Command line code on line 1
int(0)
Same result with exif_read_image_data(), the THUMBNAIL section is never
populated.
Other examples from other cameras:
http://bohwaz.net/photos/2014/02-fevrier/p20140219_193908.jpg
(Panasonic
Lumix GF5)
http://bohwaz.net/photos/2014/01-janvier/p20140117_080901.jpg
(Nokia E7
phone)
http://bohwaz.net/photos/2014/01-janvier/12-Val_Suzon/p20140112_140758.jpg
(Fujifilm HS20 EXR)
Test script:
---------------
var_dump(strlen(exif_thumbnail("http://www.exiv2.org/include/img_1771.jpg")));
Expected result:
----------------
int(5448)
Actual result:
--------------
PHP Warning: exif_thumbnail(img_1771.jpg): IFD data bad offset:
0xFFFFFC52 length 0x01C2 in Command line code on line 1
Warning: exif_thumbnail(img_1771.jpg): IFD data bad offset: 0xFFFFFC52
length 0x01C2 in Command line code on line 1
int(0)
--
Edit bug report at https://bugs.php.net/bug.php?id=72819&edit=1
--
Try a snapshot (PHP 5.4): https://bugs.php.net/fix.php?id=72819&r=trysnapshot54
Try a snapshot (PHP 5.5): https://bugs.php.net/fix.php?id=72819&r=trysnapshot55
Try a snapshot (trunk): https://bugs.php.net/fix.php?id=72819&r=trysnapshottrunk
Fixed in SVN: https://bugs.php.net/fix.php?id=72819&r=fixed
Fixed in release: https://bugs.php.net/fix.php?id=72819&r=alreadyfixed
Need backtrace: https://bugs.php.net/fix.php?id=72819&r=needtrace
Need Reproduce Script: https://bugs.php.net/fix.php?id=72819&r=needscript
Try newer version: https://bugs.php.net/fix.php?id=72819&r=oldversion
Not developer issue: https://bugs.php.net/fix.php?id=72819&r=support
Expected behavior: https://bugs.php.net/fix.php?id=72819&r=notwrong
Not enough info: https://bugs.php.net/fix.php?id=72819&r=notenoughinfo
Submitted twice: https://bugs.php.net/fix.php?id=72819&r=submittedtwice
register_globals: https://bugs.php.net/fix.php?id=72819&r=globals
PHP 4 support discontinued: https://bugs.php.net/fix.php?id=72819&r=php4
Daylight Savings: https://bugs.php.net/fix.php?id=72819&r=dst
IIS Stability: https://bugs.php.net/fix.php?id=72819&r=isapi
Install GNU Sed: https://bugs.php.net/fix.php?id=72819&r=gnused
Floating point limitations: https://bugs.php.net/fix.php?id=72819&r=float
No Zend Extensions: https://bugs.php.net/fix.php?id=72819&r=nozend
MySQL Configuration Error: https://bugs.php.net/fix.php?id=72819&r=mysqlcfg
Thread (28 messages)
- php dot bohwaz at miam dot kd2 dot org
- php dot bohwaz at miam dot kd2 dot orgBug #72819 [Opn]: EXIF thumbnails not read anymore
- php dot bohwaz at miam dot kd2 dot orgBug #72819 [Opn]: EXIF thumbnails not read anymore
- cmb@php.netBug #72819 [Opn->Fbk]: EXIF thumbnails not read anymore
- php dot bohwaz at miam dot kd2 dot orgBug #72819 [Fbk->Asn]: EXIF thumbnails not read anymore
- cmb@php.netBug #72819 [Asn->Fbk]: EXIF thumbnails not read anymore
- crberry50 at gmail dot comBug #72819 [Com]: EXIF thumbnails not read anymore
- php-bugs at lists dot php dot netBug #72819 [Fbk->NoF]: EXIF thumbnails not read anymore
- requinix@php.netBug #72819 [NoF->Fbk]: EXIF thumbnails not read anymore
- requinix@php.netBug #72819 [Fbk]: EXIF thumbnails not read anymore
- cmb@php.netBug #72819 [Fbk->Opn]: EXIF thumbnails not read anymore
- cmb@php.netBug #72819 [Asn->Ver]: EXIF thumbnails not read anymore
- kalle@php.netBug #72819 [Ver]: EXIF thumbnails not read anymore
- stephan at vierkant dot orgBug #72819 [Com]: EXIF thumbnails not read anymore
- egonfreeman at gmail dot comBug #72819 [Com]: EXIF thumbnails not read anymore
- martin at the-inspired-ones dot deBug #72819 [Com]: EXIF thumbnails not read anymore
- evil+php at piekielko dot plBug #72819 [Com]: EXIF thumbnails not read anymore
- stephan dot hesmer at gmail dot comBug #72819 [Com]: EXIF thumbnails not read anymore
- crberry50 at gmail dot comBug #72819 [Com]: EXIF thumbnails not read anymore
- php dot bohwaz at miam dot kd2 dot orgBug #72819 [Com]: EXIF thumbnails not read anymore
- kalle@php.netBug #72819 [Ver->Csd]: EXIF thumbnails not read anymore
- kalle@php.netBug #72819 [Csd->Ver]: EXIF thumbnails not read anymore
- kalle@php.netBug #72819 [Ver->Csd]: EXIF thumbnails not read anymore
- php dot bohwaz at miam dot kd2 dot orgBug #72819 [Com]: EXIF thumbnails not read anymore
- kalle@php.netBug #72819 [Csd]: EXIF thumbnails not read anymore
- php dot bohwaz at miam dot kd2 dot orgBug #72819 [Csd]: EXIF thumbnails not read anymore
- kalle@php.netBug #72819 [Csd]: EXIF thumbnails not read anymore
- crberry50 at gmail dot comBug #72819 [Com]: EXIF thumbnails not read anymore