Comments (6)
Hello, the EXIF data must be extracted from the JPEG image first.
For the image above try something like:
const sharp = require('sharp');
const exifReader = require('exif-reader');
sharp('56497304-40e89a80-64fd-11e9-9684-ee95b5d58567.JPG')
.metadata()
.then(({ exif }) => {
const exifProperties = exifReader(exif);
console.log(exifProperties);
});
which outputs:
{ image:
{ Make: 'SAMSUNG',
Model: 'SAMSUNG PL20,PL21 / VLUU PL20,PL21 ',
Orientation: 1,
XResolution: 96,
YResolution: 96,
ResolutionUnit: 2,
Software: 'Microsoft Windows Photo Viewer 6.1.7600.16385',
ModifyDate: 2019-01-14T11:31:13.000Z,
YCbCrPositioning: 2,
Copyright: 'COPYRIGHT, 2011',
ExifOffset: 2360,
...
from exif-reader.
exif-reader
does not depend onsharp
. If you need to extract EXIF data as a Buffer from an image then you can usesharp
, but other solutions may be available.sharp
usesexif-reader
to verify it was able to extract valid EXIF data as a Buffer as part of its unit tests and therefore includes it indevDependencies
.
from exif-reader.
the same for me, I tried another lib that worked and also expected a buffer => the problem is in the lib I guess.
here is a photo failing :
from exif-reader.
This bit me as well.
@lovell I believe it would make a lot of sense to include this functionality by default as the other libraries do as it's the standard use case for most.
Thoughts?
from exif-reader.
So, sharp depends on this module and this module requires sharp to work? That's a bit bizarre, imho.
from exif-reader.
@lovell thanks for clarifying that, I ended up using both sharp and exiftool a part, as it seems to be the standard. I might have a second look at this module though, since it works fine via sharp metadata.
from exif-reader.
Related Issues (13)
- Doesn't work with all EXIF images HOT 2
- When there is damaged Exif header - it causes out of memory HOT 2
- Any get EXIF from video files? HOT 1
- Support for non-ASCII charsets HOT 2
- Exif from PNGs with eXIf chunk HOT 4
- On some images Orientation gets reported incorrectly HOT 1
- Typescript Definitions HOT 3
- RFC: Use standard Exif group and tag names HOT 2
- Possible to parse dates as UTC?
- Little endian EXIF within a HEIF image HOT 5
- Wrong type definition export HOT 1
- DateTime?? or MoidyDate sometimes illegal value when the parsing day is 31st
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 exif-reader.