In EXIF, GPSAltitude is stored as a fraction string like "1/2". For values below sea level we were negating this value, in order to represent the sign and the magnitude in the same value. However, I forgot to convert that to an integer before negating it. PHP was nice enough to do a best effort conversion of the string to an integer. This resulted in altitudes below sea level being taken as just the numerator of the altitude, which gives results that can be significantly off. Also add unit tests for the GPS related image metadata stuff. Change the existing GPS test to use a fractional altitude (Since this issue isn't appearent if the denominator is 1). Add tests for XMP as well, since XMP had same issue, and has to do same processing as EXIF stuff does. In some future time, may want to consider just converting all exif rational values to real numbers during the extraction process for generally better sanity. Patchset 2: rebase Change-Id: I49032b52a4c840b28e667a6a2b8ae23c508df247 |
||
|---|---|---|
| .. | ||
| 1bit-png.png | ||
| 80x60-2layers.xcf | ||
| 80x60-Greyscale.xcf | ||
| 80x60-RGB.xcf | ||
| animated-xmp.gif | ||
| animated.gif | ||
| Animated_PNG_example_bouncing_beach_ball.png | ||
| broken_exif_date.jpg | ||
| exif-gps.jpg | ||
| exif-user-comment.jpg | ||
| greyscale-na-png.png | ||
| greyscale-png.png | ||
| Gtk-media-play-ltr.svg | ||
| iptc-invalid-psir.jpg | ||
| iptc-timetest-invalid.jpg | ||
| iptc-timetest.jpg | ||
| jpeg-comment-binary.jpg | ||
| jpeg-comment-iso8859-1.jpg | ||
| jpeg-comment-multiple.jpg | ||
| jpeg-comment-utf.jpg | ||
| jpeg-iptc-bad-hash.jpg | ||
| jpeg-iptc-good-hash.jpg | ||
| jpeg-padding-even.jpg | ||
| jpeg-padding-odd.jpg | ||
| jpeg-xmp-alt.jpg | ||
| jpeg-xmp-psir.jpg | ||
| jpeg-xmp-psir.xmp | ||
| landscape-plain.jpg | ||
| nonanimated.gif | ||
| Png-native-test.png | ||
| portrait-rotated.jpg | ||
| QA_icon.svg | ||
| README | ||
| rgb-na-png.png | ||
| rgb-png.png | ||
| test.jpg | ||
| test.tiff | ||
| Toll_Texas_1.svg | ||
| US_states_by_total_state_tax_revenue.svg | ||
| Wikimedia-logo.svg | ||
| Xmp-exif-multilingual_test.jpg | ||
| xmp.png | ||
This directory contains media files for use with the tests in includes/media directory. Image credits: QA_icon.svg: http://es.wikipedia.org/wiki/Archivo:QA_icon.svg GNU Lesser General Public License ~~helix84 (16.4.2007), Philverney (6.12.2005) David Vignoni Gtk-media-play-ltr.svg http://commons.wikimedia.org/wiki/File:Gtk-media-play-ltr.svg GNU Lesser General Public License http://ftp.gnome.org/pub/GNOME/sources/gnome-themes-extras/0.9/gnome-themes-extras-0.9.0.tar.gz David Vignoni US_states_by_total_state_tax_revenue.svg http://commons.wikimedia.org/wiki/File:US_states_by_total_state_tax_revenue.svg CC-BY 3.0 TastyCakes on English Wikipedia greyscale-na-png.png, rgb-png.png, Xmp-exif-multilingual_test.jpg greyscale-png.png, 1bit-png.png, Png-native-test.png, rgb-na-png.png, test.tiff, test.jpg, jpeg-comment-multiple.jpg, jpeg-comment-utf.jpg, jpeg-comment-iso8859-1.jpg, jpeg-comment-binary.jpg, jpeg-xmp-psir.jpg, jpeg-xmp-alt.jpg, animated.gif, exif-user-comment.jpg, animated-xmp.gif, iptc-timetest-invalid.jpg, jpeg-iptc-bad-hash.jpg, iptc-timetest.jpg, xmp.png, nonanimated.gif, exif-gps.jpg, jpeg-xmp-psir.xmp, jpeg-iptc-good-hash.jpg, jpeg-padding-even.jpg, jpeg-padding-odd.jpg Are all by Bawolff. I don't think they contain enough originality to claim copyright, but on the off chance they do, feel free to use them however you feel fit, without restriction. Animated_PNG_example_bouncing_beach_ball.png http://commons.wikimedia.org/wiki/File:Animated_PNG_example_bouncing_beach_ball.png (originally http://www.treebuilder.de/default.asp?file=89031.xml ) Public Domain Holger Will