Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Read tif image metadata in nodejs

What I want to do is read metadata from a tiff image from nodejs, this image come from a scientific device and has some specific information. In linux I have installed exiftool and it retrive correctly all metadata of that image.

The problem is in nodejs, I have tried many modules but nobody of them works, for example I've installed exif-parser that is one of the most popular and tried to do this:

var buffer = readSync('./example_image.tif');
var parser = require('exif-parser').create(buffer);
var result = parser.parse();

But appears this error: "JPEG section offset"

like image 238
g. tu Avatar asked Feb 25 '26 23:02

g. tu


1 Answers

I've solved this problem using the library exif-vendored. Consulnting the documentation I've seen that there's the possibility to specify a certain "custom" tag to read. I've tried all exif libraries but I think that's the only that can read custom tag from a TIFF file

like image 108
giutuliri Avatar answered Feb 27 '26 12:02

giutuliri



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!