apache / cordova-plugin-camera

Apache Cordova Plugin camera
https://cordova.apache.org/
Apache License 2.0
960 stars 1.52k forks source link

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

Open mariusvn opened 6 months ago

mariusvn commented 6 months ago

Platforms affected

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/camera@5.46.0

Checklist

mariusvn commented 6 months ago

should be done

breautek commented 6 months ago

FYI we can ignore the failing Chrome test suite.