tidev / titanium-sdk

🚀 Native iOS and Android Apps with JavaScript
https://titaniumsdk.com/
Other
2.76k stars 1.21k forks source link

feat(android): return and store exif data in blob/file #14074

Open m1ga opened 4 months ago

m1ga commented 4 months ago

Two new features:

var win = Ti.UI.createWindow();

win.addEventListener("click", function() {
    Ti.Media.showCamera({
        success: function(event) {
            console.log(event.media.exif)

            var f = Titanium.Filesystem.getFile(Titanium.Filesystem.applicationDataDirectory + "/image.jpg");
            f.write(event.media);

            var f1 = Titanium.Filesystem.getFile(Titanium.Filesystem.applicationDataDirectory + "/image1.jpg");
            f1.write(event.media.imageAsCompressed(0.9));
        }
    });
})

win.open();

Test 12.3.1:

With this PR:

TODO