Hi all, I have see this code:
var options = {
quality: 100,
targetWidth: 320,
targetHeight: 320,
saveToPhotoAlbum: true,
destinationType: Camera.DestinationType.FILE_URI,
EncodingType: navigator.camera.EncodingType.JPEG,
sourceType: Camera.PictureSourceType.PHOTOLIBRARY
};
navigator.camera.getPicture(
function(imageURI) {
window.resolveLocalFileSystemURL(imageURI,
function(entry) {
entry.file(function(file) {
EXIF.getData(file, function() {
var datetime = EXIF.getTag(this, "DateTimeOriginal");
alert(datetime);
});
// do something useful....
}, function (e) {
sharedService.log("resolveLocalFileSystemURL -> entry.file -> error",e);
});
},
function(e) {
alert('Unexpected error obtaining image file.');
sharedService.log("resolveLocalFileSystemURL -> error",e);
});
},
function() {
// nada - cancelled
},
options);
For EXIF I use EXIF-js.js library.
Why datetime is always “undefined” ?
I have change Camera.PictureSourceType.PHOTOLIBRARY to Camera.PictureSourceType.CAMERA but with the same result.
I know that all my test images have EXIF data because if I open them with an EXIF extractor I can see all EXIF data.
Thanks.
M.