#30829 [Sus->Bgs]: exif_read_data() returns wrong GPSLatitude and GPSLongitude
| From: | derick@php.net | Date: | Fri, 19 Nov 2004 08:42:10 +0000 |
| Subject: | #30829 [Sus->Bgs]: exif_read_data() returns wrong GPSLatitude and GPSLongitude | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-69247@lists.php.net to get a copy of this message | ||
ID: 30829
Updated by: derick@php.net
Reported By: junk at genokita dot net
-Status: Suspended
+Status: Bogus
Bug Type: *Graphics related
Operating System: RedHatLinux9
PHP Version: 5.0.2
New Comment:
.
Previous Comments:
------------------------------------------------------------------------
[2004-11-19 08:55:00] derick@php.net
Still no bug in PHP -> bogus.
------------------------------------------------------------------------
[2004-11-19 08:34:42] junk at genokita dot net
my fault. I forgot to check GPS IFD SPEC.
thx for your kindness.
------------------------------------------------------------------------
[2004-11-18 22:54:03] iliaa@php.net
Thank you for taking the time to write to us, but this is not
a bug. Please double-check the documentation available at
http://www.php.net/manual/ and the instructions on how to
report
a bug at http://bugs.php.net/how-to-report.php
Integer data is read as integer thus leading 0s are removed.
------------------------------------------------------------------------
[2004-11-18 17:02:17] junk at genokita dot net
Description:
------------
Hi,
something wrong about returned value of exif_read_data(), includes
"0"(zero) at the beginning of 3rd element at "GPSLatitude" and
"GPSLongitude".
would you see sample code below, $exif_array['GPSLongitude'][2] is
expected return '0997/100', but retuns '997/100' in some JPEG file.
"zero" was missing. it's the same at "GPSLatitude".
sample jpg file:
http://www.genokita.net/a30284954ba1884666d8016f0448a644.jpg
Reproduce code:
---------------
print_r( exif_read_data($path_to_image, 'IDF0') );
Expected result:
----------------
..*snip*..
[GPSLongitude] => Array
(
[0] => 139/1
[1] => 42/1
[2] => 0997/100
)
..*snip*..
Actual result:
--------------
..*snip*..
[GPSLongitude] => Array
(
[0] => 139/1
[1] => 42/1
[2] => 997/100
)
..*snip*..
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/?id=30829&edit=1