Pavan Alapati
Pavan Alapati

Reputation: 635

how to get image Details form mobile folder location

We have image path like

cdvfile://localhost/persistent/DCIM/Camera/1395167011485.jpg.

OR

file://localhost/persistent/DCIM/Camera/1395167011485.jpg.

We need get image details using this path.Image details like Image Name,height, width.We are developing Cordova mobile apps.Please guide to us .Which plugin we need use for Details.

Upvotes: 0

Views: 72

Answers (2)

Bob
Bob

Reputation: 1679

You might find this javascript exif library useful.

Upvotes: 1

Kody R.
Kody R.

Reputation: 2460

You don't need a specific plugin, though you could use file transfer to help with it. Something like the following will work fine:

var image = document.createElement('img');
image.src = "img/My_Image.png";
console.log(image.height);
console.log(image.width);

Upvotes: 2

Related Questions