Ilmari Karonen <> changed:

           What    |Removed                     |Added
   Attachment #7017|0                           |1
        is obsolete|                            |

--- Comment #21 from Ilmari Karonen <> 2010-01-25 23:09:50 UTC 
Created an attachment (id=7018)
 --> (
Patch to Exif.php to fix this for GPS coordinates only (using rational math;

OK, it seems the previous version of the patch had some bugs and issues with
numerical overflow.  I've hopefully fixed them in this version, although at the
cost of some extra complexity.

Even though all the values should be integers, I'm now using fmod() and
sprintf("%.0f") in order to get more more precision and better overflow
behavior.  Even so, I expect that there are technically valid inputs that can
cause loss of precision -- after all, even IEEE doubles only have a 52-bit
mantissa.  Still, the code should hopefully return approximately correct values
even in that case, though I haven't yet stress-tested it very thoroughly.

Also, I made the pretty-printed output localizable.  The default format is
still $1° $2' $3", but now it can be changed for languages in which some other
format is normally used.

Configure bugmail:
------- You are receiving this mail because: -------
You are the assignee for the bug.
You are watching all bug changes.
Wikibugs-l mailing list

Reply via email to