guilhermefarias / cordova-exif

:camera: This plugin, is the simplest way to get exif data of images at Cordova platform (Phonegap)
Other
42 stars 33 forks source link

imageUri? #1

Open smolleyes opened 10 years ago

smolleyes commented 10 years ago

hi

what s the imageUri in your exemple ???

i hava a blob then i do

var imageURI = window.webkitURL.createObjectURL(blob); alert(imageURI) CordovaExif.readData(imageURI, function(exifObject) { alert(exifObject) });

alert(imageURI) ok but alert(exifObject) not working...

an idear?

thanks

guilhermefarias commented 10 years ago

The imageUri must be the data returned by success callback function executed by navigator.camera.getPicture function.

var options = {
    quality: 90,
    sourceType: 2,
    destinationType: 1,
};
function onSuccess(imageURI) {
    CordovaExif.readData(imageURI, function(exifObject) {
        console.log(exifObject);
    });
};
function onFail(message) {};
navigator.camera.getPicture(onSuccess, onFail, options);