apache / apache/cordova-plugin-camera
Exif data lost if picture retrieved from gallery in DATA_URL on android
- Dominant language
- Objective-C
- Stars
- 976
- Forks
- 1.6k
- PR merge metrics
- No merged PRs in 30d
Description
# Bug Report
## Problem
### What is expected to happen?
Have the base64 of the picture with all the original jpeg exif metadata in a data url
### What does actually happen?
The given picture in the data url never see its exif data back
## Information
- Load an image from the gallery (i use jpeg) on android
- Check the exif data
Also, I looked at the code, and there should be a loading of exif data in `android/CameraLauncher.java:1300` in the `processPicture` method or at least before the execution of `processPicture` on `android/CameraLauncher.java:781`.
### Command or Code
```
// This is approximate since i work on angular with @awesome-cordova-plugins/camera
getPicture({
quality: 50,
destinationType: DestinationType.DATA_URL,
encodingType: EncodingType.JPEG,
mediaType: MediaType.PICTURE,
targetHeight: 720,
targetWidth: 1280,
sourceType: PictureSourceType.PHOTOLIBRARY,
});
```
### Environment, Platform, Device
Galaxy Tab S8, Android 13
### Version information
Ionic 5,
Android 13,
Editing on windows,
Angular 10
## Checklist
- [x] I searched for existing GitHub issues
- [ ] I updated all Cordova tooling to most recent version
- [x] I included all the necessary information above
Contributor guide
Research direction
Start in android/CameraLauncher.java at processPicture and the gallery-to-DATA_URL path around the referenced lines. Reproduce with a JPEG containing EXIF metadata on Android, then verify that the returned base64 data URL retains the original EXIF data.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- java
- Domain
- mobile-dev
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 42/100