-
Notifications
You must be signed in to change notification settings - Fork 71
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
GPS tags on mobile devices #64
Comments
Hello. Can you describe the problem a little more? |
Yes, I can! While i making test projects, I had a suspicion on my React. Test projects where I can retry bug here https://codepen.io/gonzika/pen/QWprXdK |
Having a similar issue in a React project where I'm using Capacitor Camera plugin in conjunction with exifr. I've got it set up to create an Android project and to verify that exifr was working I have 2 alerts set up, one to display make and model and another to display lat/lon. When I run it directly from VS Code as a PWA I can attach an image that I've transferred from my Android phone and it will display the correct lat/lon in the alert. When I run it on my phone through Android Studio and take a picture, I get the make and model alert, but not the lat/long alert I'm assuming because it's getting an error. When I attach the same photo that gave me the correct lat/lon in PWA, it gives me "0/0" when running on my phone. I'm guessing there's a location permissions issue that needs to be set in the Androidmanifest.xml, but I haven't figured that out yet. |
I have a similar issue, but the problem is not in the library, but in the device. Android and iOS strips down geolocation data on file upload. On Android - if I choose to browse files with another app, then geolocation data is preserved. |
you can try input without accept. |
I'm experiencing a similar issue, and I think I've been able to rule out Android metadata-stripping as the cause. I may try to put together a minimal test case to make debugging easier, but I've starting describing my problem and work-in-progress to fix it at josephfrazier/reported-web#360, including a bit where I'm md5sum'ing the image uploaded by the browser, and getting the same result on both desktop and mobile. |
This fixes #361. Here's the whole saga: Here's an example image that works on desktop, but not mobile: https://photos.app.goo.gl/AcEfSrYTMqgp6JfX8 Using [`eruda`](https://www.npmjs.com/package/eruda) to see the JS console with [this branch](#360), I see this on desktop: ```js Extracted GPS latitude/longitude location from EXIF metadata Object {latitude: 40.717019444444446, longitude: -73.99356388888889} ``` but this on mobile: ```js Extracted GPS latitude/longitude location from EXIF metadata Object {latitude: "NaN", longitude: "NaN"} ``` --- Seems like this issue might be within the `exifr` library: https://github.com/MikeKovarik/exifr --- To rule out the possibility that the EXIF metadata is getting stripped when uploaded from my phone, [I logged out the md5sum of the image right before parsing the metadata](4208a1b), and it is `441018525208457705bf09a8ee3c1093` on both desktop and mobile, yet the `GPSLatitude` and `GPSLongitude` arrays are `[NaN, NaN, NaN]` on mobile, but `[40, 43, 1.27]`and `[73, 59, 36.83]` on desktop, respectively. --- related exifr issue: MikeKovarik/exifr#64 --- > [I logged out the md5sum of the image right before parsing the metadata](4208a1b), and it is `441018525208457705bf09a8ee3c1093` on both desktop and mobile Ugh, it looks like the package I chose to use might have a bug that causes this value to show up for ArrayBuffers: pvorb/node-md5#49 --- If I switch to [object-hash](https://github.com/puleos/object-hash), I get a sha1 of `b287c307cd89cfd2ce779b975b961b4824f2714a` on desktop, but it crashes on my phone, so I guess I need something less resource-intensive... --- Seems like Android is stripping GPS from EXIF after all, when the `<input>` element has an `accept` attribute specifying images, but removing the attribute does the trick for me.
I was just revisiting this issue, and wanted to confirm for anyone else who ends up here that removing the |
Hello! I have problem with parse GPS tags on mobile devices. On destop all working well.
![image](https://user-images.githubusercontent.com/63928278/120917334-632adb80-c6b7-11eb-974f-4b777acbc448.png)
But with same photo, on mobile I can not parse no one GPS tags.
![image](https://user-images.githubusercontent.com/63928278/120917380-9ff6d280-c6b7-11eb-9491-a95fc04c7eb9.png)
How can i get this tags? Here https://mutiny.cz/exifr/ all working well.
I had this problem with other exif-programs like exif-js.
Thank you
The text was updated successfully, but these errors were encountered: