commcare-android
commcare-android copied to clipboard
Passthrough Allow-Listed EXIF properties (GPS specifically) with resized images
Bug Description
The image capture process creates a new copy of the source image without passing through any existing captured EXIF properties. This results in the loss of GPS/Geolocation data and potentially other useful EXIF properties.
Current Behavior
The captured image is saved without retaining any EXIF properties from the original image. While some EXIF properties (e.g., camera details, resolution) may no longer be relevant, important data like GPS/Geolocation is also stripped.
Expected Behavior
Captured images should retain relevant EXIF properties, particularly GPS/Geolocation data. Other common and useful EXIF properties should also be considered for retention.
Reproduction Steps
Note: These steps assume you have basic knowledge of navigating and using the CommCare platform. If you are unfamiliar with how to perform basic setup steps, a getting started guide is available here.
- Create a CCHQ app that captures images.
- Install the app on an Android device and capture a photo
- Inspect the EXIF data of the saved image to verify that the GPS/Geolocation properties have not been retained.
- You can use free online platforms like Ezgif / Metadata2Go to do so.
Possible Solution
- Retain GPS/Geolocation Data: Modify the image capture process to retain GPS/Geolocation data from the original image.
- Review and Retain Other EXIF Properties: Conduct a review to identify other common and useful EXIF properties that should be retained. These may include, but are not limited to, date/time, orientation, and possibly other metadata that users may find useful.
Additional Information/Context
Keep in mind that it may not be possible to replicate the issue on all devices.
Environment details (OS name and version, etc.)
No response