Comments (2)
exif-reader does not read JPEG images directly, only raw EXIF data. You need to first extract the EXIF chunk from the JPEG and then pass it to exif-reader. Support for this is built into jpg-stream.
from exif-reader.
A simple workaround without pulling in yet another lib.
const img = readFileSync('flower.jpg')
const imageMetadata = exif(img.slice(img.toString('ascii', 0, 100).indexOf('Exif')))
I don't know if that is a bad way to go about it though... :-/
from exif-reader.
Related Issues (13)
- When there is damaged Exif header - it causes out of memory HOT 2
- data: buffer should start with "Exif" HOT 6
- 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.