cordova-plugin-camera icon indicating copy to clipboard operation
cordova-plugin-camera copied to clipboard

fix(android): Fixed exif handling when loading picture from gallery

Open mariusvn opened this issue 1 year ago • 2 comments

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

mariusvn avatar Nov 08 '23 10:11 mariusvn

should be done

mariusvn avatar Nov 10 '23 09:11 mariusvn

FYI we can ignore the failing Chrome test suite.

breautek avatar Nov 10 '23 14:11 breautek