Comments (2)
Hi,
I was facing the same issue. Most likely you are not reading the files correctly and Exif is failing silently.
Doing this fixed it for me
var files = e.target.files; // This is basically the filelist object.
for ( file of files) {
let reader = new FileReader();
reader.onload = function (readerEvent) {
try {
let tags = ExifReader.load(readerEvent.target.result);
coordinates_array.push( { 'lat':tags['GPSLatitude'].description, 'lng':tags['GPSLongitude'].description } );
// After getting the coordinates delete tags as it can have a huge memory imprint.
delete tags;
} catch (error) {
console.log("EXIF failed: ", error);
}
};
reader.readAsArrayBuffer( file );
}
from exifreader.
@sudhar99 I think this is your issue: When using expanded: true
the result comes back segmented into file, exif and xmp properties like this: {"file": {...file tags...}, "exif": {...exif tags...}, "xmp": {...xmp tags...}}
. Your loop tries to get the description on the wrong object, you have to go one step deeper in the structure. If you're only interested in the XMP data, change to this and it should work: listTags(exifData.xmp);
from exifreader.
Related Issues (20)
- Exception is thrown when reading tags from an image HOT 5
- Possible to add support for protocols other than http? Or bypass to allow another protocol? HOT 3
- Custom build failures for Yarn Berry HOT 2
- Custom build installs excessive dependencies HOT 5
- (Not An Issue) How to remove metadata and Update the buffer HOT 1
- Typescript types for GIF support HOT 2
- Webpack error when attemping to use custom build HOT 3
- Incorrect exposure time reported for description HOT 9
- Newbie question: why are scalar exif properties (like DateTimeOriginal and most others) returned as string arrays? HOT 3
- Feature request: AVIF format HOT 5
- Feature Request: Support for MOV, MP4, etc HOT 1
- exif-reader.d.ts's NumberArrayTag type for GPSLatitude & GPSLongitude should be number[][] rather than number[] HOT 1
- Error with image in AVIF format HOT 1
- The width and height of the image are incorrectly obtained HOT 1
- Lens model doesn't seem to be parsed correctly HOT 8
- How to extract metadata from HTMLImageElement? HOT 2
- fileExif.exif.GPSLatitude value vs description HOT 2
- lens_specification read value overflow HOT 2
- `zTXt` tag values are decoded incorrectly HOT 7
- How to get raw exif data? HOT 10
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from exifreader.