Skip to content
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

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

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

mariusvn
Copy link

@mariusvn mariusvn commented Nov 8, 2023

Platforms affected

  • Android

Motivation and Context

The exif data was removed if we loaded from the gallery in DATA_URL format.

This should fix #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/camera@5.46.0

Checklist

  • I've run the tests to see all new and existing tests pass
  • I added automated test coverage as appropriate for this change
  • 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)
  • I've updated the documentation if necessary

src/android/CameraLauncher.java Outdated Show resolved Hide resolved
@mariusvn
Copy link
Author

should be done

@breautek
Copy link
Contributor

FYI we can ignore the failing Chrome test suite.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Exif data lost if picture retrieved from gallery in DATA_URL on android
2 participants