Bug #73004 [NEW]: PHP 5.6 Doesn't Read EXIF Location
| From: | tom_kincaid at hotmail dot com | Date: | Fri, 02 Sep 2016 14:10:40 +0000 |
| Subject: | Bug #73004 [NEW]: PHP 5.6 Doesn't Read EXIF Location | ||
| Groups: | php.bugs | ||
| Request: | Send a blank email to php-bugs+get-203749@lists.php.net to get a copy of this message | ||
From: tom_kincaid at hotmail dot com
Operating system: Centos 7
PHP version: 5.6.25
Package: EXIF related
Bug Type: Bug
Bug description:PHP 5.6 Doesn't Read EXIF Location
Description:
------------
exif_read_data on 5.6 doesn't read the EXIF location data. This data is
in the photo, but doesn't appear in the response from exif_read_data
[GPSLatitudeRef] => N
[GPSLatitude] => Array
(
[0] => 40/1
[1] => 42/1
[2] => 4941/100
)
[GPSLongitudeRef] => W
[GPSLongitude] => Array
(
[0] => 73/1
[1] => 57/1
[2] => 2954/100
)
Here is a sample image with EXIF GPS location:
https://dl.dropboxusercontent.com/u/34732957/test.jpg
Test script:
---------------
$exif = exif_read_data ("/path/to/photo.jpg");
print_r($exif);
Expected result:
----------------
Array
(
[FileName] => test.jpg
[FileDateTime] => 1472824820
[FileSize] => 1406969
[FileType] => 2
[MimeType] => image/jpeg
[SectionsFound] => ANY_TAG, IFD0, THUMBNAIL, EXIF, GPS
[COMPUTED] => Array
(
[html] => width="3264" height="2448"
[Height] => 2448
[Width] => 3264
[IsColor] => 1
[ByteOrderMotorola] => 1
[ApertureFNumber] => f/2.2
[Thumbnail.FileType] => 2
[Thumbnail.MimeType] => image/jpeg
)
[Make] => Apple
[Model] => iPhone 5s
[Orientation] => 1
[XResolution] => 72/1
[YResolution] => 72/1
[ResolutionUnit] => 2
[Software] => 9.2
[DateTime] => 2016:04:10 17:05:26
[YCbCrPositioning] => 1
[Exif_IFD_Pointer] => 198
[GPS_IFD_Pointer] => 1612
[THUMBNAIL] => Array
(
[Compression] => 6
[XResolution] => 72/1
[YResolution] => 72/1
[ResolutionUnit] => 2
[JPEGInterchangeFormat] => 1952
[JPEGInterchangeFormatLength] => 9663
)
[ExposureTime] => 1/1709
[FNumber] => 11/5
[ExposureProgram] => 2
[ISOSpeedRatings] => 32
[ExifVersion] => 0221
[DateTimeOriginal] => 2016:04:10 17:05:26
[DateTimeDigitized] => 2016:04:10 17:05:26
[ComponentsConfiguration] =>
[ShutterSpeedValue] => 19277/1795
[ApertureValue] => 7983/3509
[BrightnessValue] => 6632/653
[ExposureBiasValue] => 0/1
[MeteringMode] => 5
[Flash] => 24
[FocalLength] => 83/20
[SubjectLocation] => Array
(
[0] => 1632
[1] => 1224
[2] => 1793
[3] => 1073
)
[MakerNote] => Apple iOS...
[SubSecTimeOriginal] => 986
[SubSecTimeDigitized] => 986
[FlashPixVersion] => 0100
[ColorSpace] => 1
[ExifImageWidth] => 3264
[ExifImageLength] => 2448
[SensingMethod] => 2
[SceneType] =>
[ExposureMode] => 0
[WhiteBalance] => 0
[DigitalZoomRatio] => 1224/463
[FocalLengthIn35mmFilm] => 76
[SceneCaptureType] => 0
[UndefinedTag:0xA432] => Array
(
[0] => 83/20
[1] => 83/20
[2] => 11/5
[3] => 11/5
)
[UndefinedTag:0xA433] => Apple
[UndefinedTag:0xA434] => iPhone 5s back camera 4.15mm f/2.2
[GPSLatitudeRef] => N
[GPSLatitude] => Array
(
[0] => 40/1
[1] => 42/1
[2] => 4941/100
)
[GPSLongitudeRef] => W
[GPSLongitude] => Array
(
[0] => 73/1
[1] => 57/1
[2] => 2954/100
)
[GPSAltitudeRef] =>
[GPSAltitude] => 9068/843
[GPSTimeStamp] => Array
(
[0] => 21/1
[1] => 5/1
[2] => 2426/100
)
[GPSSpeedRef] => K
[GPSSpeed] => 0/1
[GPSDateStamp] => 2016:04:10
[UndefinedTag:0x001F] => 65/1
)
Actual result:
--------------
Array
(
[FileName] => test.jpg
[FileDateTime] => 1472776885
[FileSize] => 1406969
[FileType] => 2
[MimeType] => image/jpeg
[SectionsFound] => ANY_TAG, IFD0, EXIF
[COMPUTED] => Array
(
[html] => width="3264" height="2448"
[Height] => 2448
[Width] => 3264
[IsColor] => 1
[ByteOrderMotorola] => 1
[ApertureFNumber] => f/2.2
)
[Make] => Apple
[Model] => iPhone 5s
[Orientation] => 1
[XResolution] => 72/1
[YResolution] => 72/1
[ResolutionUnit] => 2
[Software] => 9.2
[DateTime] => 2016:04:10 17:05:26
[YCbCrPositioning] => 1
[ExposureTime] => 1/1709
[FNumber] => 11/5
[ExposureProgram] => 2
[ISOSpeedRatings] => 32
[ExifVersion] => 0221
[DateTimeOriginal] => 2016:04:10 17:05:26
[DateTimeDigitized] => 2016:04:10 17:05:26
[ComponentsConfiguration] =>
[ShutterSpeedValue] => 19277/1795
[ApertureValue] => 7983/3509
[BrightnessValue] => 6632/653
[ExposureBiasValue] => 0/1
[MeteringMode] => 5
[Flash] => 24
[FocalLength] => 83/20
[SubjectLocation] => Array
(
[0] => 1632
[1] => 1224
[2] => 1793
[3] => 1073
)
)
--
Edit bug report at https://bugs.php.net/bug.php?id=73004&edit=1
--
Try a snapshot (PHP 5.4): https://bugs.php.net/fix.php?id=73004&r=trysnapshot54
Try a snapshot (PHP 5.5): https://bugs.php.net/fix.php?id=73004&r=trysnapshot55
Try a snapshot (trunk): https://bugs.php.net/fix.php?id=73004&r=trysnapshottrunk
Fixed in SVN: https://bugs.php.net/fix.php?id=73004&r=fixed
Fixed in release: https://bugs.php.net/fix.php?id=73004&r=alreadyfixed
Need backtrace: https://bugs.php.net/fix.php?id=73004&r=needtrace
Need Reproduce Script: https://bugs.php.net/fix.php?id=73004&r=needscript
Try newer version: https://bugs.php.net/fix.php?id=73004&r=oldversion
Not developer issue: https://bugs.php.net/fix.php?id=73004&r=support
Expected behavior: https://bugs.php.net/fix.php?id=73004&r=notwrong
Not enough info: https://bugs.php.net/fix.php?id=73004&r=notenoughinfo
Submitted twice: https://bugs.php.net/fix.php?id=73004&r=submittedtwice
register_globals: https://bugs.php.net/fix.php?id=73004&r=globals
PHP 4 support discontinued: https://bugs.php.net/fix.php?id=73004&r=php4
Daylight Savings: https://bugs.php.net/fix.php?id=73004&r=dst
IIS Stability: https://bugs.php.net/fix.php?id=73004&r=isapi
Install GNU Sed: https://bugs.php.net/fix.php?id=73004&r=gnused
Floating point limitations: https://bugs.php.net/fix.php?id=73004&r=float
No Zend Extensions: https://bugs.php.net/fix.php?id=73004&r=nozend
MySQL Configuration Error: https://bugs.php.net/fix.php?id=73004&r=mysqlcfg