Comments (1)
I did some quick experimentation. Exifr can successfully parse very long text fields from PNGs, but only if the text been encoded into the PNG file as tEXt chunks. There are three kinds of text chunks the PNG specification allows - tEXt, zTXt, and iTXt - and Exifr currently only has code to process the first of these. The other two are simply ignored.
tEXt is the simplest: it's just plain text, stored in the Latin-1 encoding. It's the easiest for Exifr to process as a result.
zTXt is semantically the same as tEXt, except that the text data is stored compressed, so it's recommended for longer strings. Depending on the software you're using to make your PNGs, it might decide to use a zTXt chunk rather than a tEXt chunk when the field's length hits 1000 characters, but there's no hard requirement that this happen. For example, ExifTool produces a tEXt chunk unless it's explicitly asked to use compression.
Finally, iTXt refers to international text - the text is stored in UTF-8 encoding, and may optionally be compressed as well. ExifTool and most likely other PNG processing software will automatically switch to this encoding if the text to be stored contains any characters outside of the Latin-1 range.
The main problem with Exifr supporting these extra chunk types is that both of them use compression. Currently Exifr can handle a few compressed fields, but only when it's running in Node, not in the browser, because Node's standard library provides zlib bindings and browsers do not. Requiring an alternative deflate implementation to read compressed metadata in-browser, such as fflate, would be entirely doable however.
from exifr.
Related Issues (20)
- Missing/wrong Rating meta? HOT 2
- Using exifr.parse on a buffer that contains just exif data HOT 1
- Parsing makerNote tag HOT 5
- Missing some tag data HOT 1
- Can't load fs and zlib HOT 1
- Unable to get lens model number for Nikon camera, I'm sure it's stored in MakerNote
- How to store all tags in the specified image? HOT 2
- Why doesn't appear on jpg pages?
- exifr leaks File Descriptors on error
- exifr.gps -> NaN on ios 15 - desktop and android 13 are fine
- Error: ICC header is too short on AVIF image HOT 1
- JPG ifd1 ThumbnailOffset was lost 12 byte
- Automate transcoding of userComment string value
- Support for recent accessibility IPTC fields HOT 4
- Null value for GPS data , while uploading image from android(v11 + ) mobile HOT 1
- Compatibility with Vite
- Support for react native typescript
- Expose TIFF header start and position of Makernote tag HOT 3
- Parsing IPTC from TIFF throws error
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 exifr.