cordova-plugin-camera
cordova-plugin-camera copied to clipboard
fix(android): Fixed exif handling when loading picture from gallery
Platforms affected
- Android
Motivation and Context
The exif data was removed if we loaded from the gallery in DATA_URL format.
This should fix https://github.com/apache/cordova-plugin-camera/issues/867.
Description
Instead for returning the bitmap compressed and encoded in base64, we save it into a file, and apply the input exif data and then we put it back in the memory to encode it in base64 and return it.
Testing
I tested my changes in an ionic app that use this feature via @awesome-cordova-plugins/[email protected]
Checklist
- [ ] I've run the tests to see all new and existing tests pass
- [ ] I added automated test coverage as appropriate for this change
- [x] Commit is prefixed with
(platform)
if this change only applies to one platform (e.g.(android)
) - [ ] If this Pull Request resolves an issue, I linked to the issue in the text above (and used the correct keyword to close issues using keywords)
- [x] I've updated the documentation if necessary
should be done
FYI we can ignore the failing Chrome test suite.