-
Notifications
You must be signed in to change notification settings - Fork 155
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
Remove all GPS metadata from images uploaded as media #3781
Remove all GPS metadata from images uploaded as media #3781
Conversation
Previously a minimal set of tags were removed, but we should make sure every single one of them is removed.
📱 Scan the QR code below to install the build (arm64 only) for this PR. |
Quality Gate passedIssues Measures |
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## develop #3781 +/- ##
===========================================
+ Coverage 82.93% 82.95% +0.01%
===========================================
Files 1771 1771
Lines 44483 44514 +31
Branches 5222 5222
===========================================
+ Hits 36894 36925 +31
Misses 5754 5754
Partials 1835 1835 ☔ View full report in Codecov by Sentry. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM I guess? :D
// See ExifInterface.TAG_GPS_INFO_IFD_POINTER | ||
exifInterface.setAttribute("GPSInfoIFDPointer", null) | ||
exifInterface.setAttribute(ExifInterface.TAG_USER_COMMENT, null) | ||
exifInterface.setAttribute(ExifInterface.TAG_SUBJECT_LOCATION, null) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
TAG_SUBJECT_LOCATION
is not in the new list, has it been removed by mistake?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think it was added by mistake before, so I removed it. The docs say:
Indicates the location of the main subject in the scene. The value of this tag represents
the pixel at the center of the main subject relative to the left edge, prior to rotation
processing as per {@link #TAG_ORIENTATION}. The first value indicates the X column number
and second indicates the Y row number. When a camera records the main subject location,
it is recommended that {@link #TAG_SUBJECT_AREA} be used instead of this tag.
So it's not user location, but some metadata to help image viewers locate the 'important' part of the image.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
OK, thanks for explaining!
I think that this should be behind a toggle, because sometimes I want to send an image to someone with location data. |
You can still send the image as a file and it'll be sent with no changes. |
Content
Removes all GPS related EXIF metadata from images sent as media (images sent as files will be kept as they are).
Motivation and context
Previously a minimal set of tags were removed, but we should make sure every single one of them is removed.
Tests
Maybe do the same while taking a picture using the camera.
Tested devices
Checklist