php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #30829 exif_read_data() returns wrong GPSLatitude and GPSLongitude
Submitted: 2004-11-18 17:02 UTC Modified: 2005-02-01 22:51 UTC
From: junk at genokita dot net Assigned:
Status: Not a bug Package: EXIF related
PHP Version: 5.0.2 OS: RedHatLinux9
Private report: No CVE-ID: None
View Add Comment Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
You can add a comment by following this link or if you reported this bug, you can edit this bug over here.
(description)
Block user comment
Status: Assign to:
Package:
Bug Type:
Summary:
From: junk at genokita dot net
New email:
PHP Version: OS:

 

 [2004-11-18 17:02 UTC] 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*..



Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2004-11-18 22:54 UTC] 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-19 08:34 UTC] junk at genokita dot net
my fault. I forgot to check GPS IFD SPEC.
thx for your kindness.
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Thu Apr 18 13:01:27 2024 UTC