https://bugzilla.wikimedia.org/show_bug.cgi?id=13172

--- Comment #18 from Lupo <lupo.bugzi...@gmail.com> 2010-01-25 10:47:23 UTC ---
re: exif_read_data returning a single rational:

Yes, I also understand the EXIF spec to say that GPS coordinates are always
three rationals. It appears, however, that actual implementations apparently
treat it as "at most three rationals". Note that the current implementation
works for files that have the coordinates as single fractional degrees. An
example file is http://commons.wikimedia.org/wiki/File:DubocePark.jpg

The file linked contains in the GPS IFD the sequence

00 02 00 05 00 00 00 01 00 00 0E DF 

which is "00 02"->(tag: GPSLatitude), "00 05"->(type: Rational), "00 00 00
01"->(count: 1), "00 00 0E DF"->(offset for value > 4 bytes). The value at the
offset is then "02 40 51 8C 00 0F 42 40", which is 37769612/1000000, i.e.
37.769612 degrees.

So it appears that either the Nikon D80 used for that image generates incorrect
EXIF, or our understanding of the standard is wrong.  The interpretation of "up
to three" appears to be consistent with the TIFF 6.0 standard
http://partners.adobe.com/public/developer/en/tiff/TIFF6.pdf to which the EXIF
standard explicitly defers to in its section 4.6.2.

In either case it appears that our code should be able to handle up to three
rational values, not just exactly three values. It looks as if exif_read_data
does this, returning a single rational for File:DubocePark.jpg, which has only
one value in the EXIF, but returning an array if there are several values in
the EXIF. Other EXIF viewers also can cope with "up to three" rationals; they
don't require exactly three.

-- 
Configure bugmail: https://bugzilla.wikimedia.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.
You are watching all bug changes.

_______________________________________________
Wikibugs-l mailing list
Wikibugs-l@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/wikibugs-l

Reply via email to