exifr
exifr copied to clipboard
Issue reading APP1 data
Hi Mike,
When trying to parse the Exif of the attached image, a lot of the data is missing, such as very standard fields like ImageWidth and Height.
If you parse it using http://exif.regex.info/exif.cgi you can see a whole APP1 section is being missed in the parsing.
Hello. thanks for checking in.
This is a strange case. I took a quick look at it and it's not that there would be more unread values. We're correctly reading all of them - 9 for ifd0, 6 for exif, 7 for gps
XMP is also marked as APP1 (more info here) and exifr can get you the XMP as an XML string (we're not parsing XML because there are many more libraries for that).
But I know that's not what you're talking about. This more like me posting notes to myself here :D
But anyway, then there's the other APP1 section that doesn't get read. I think you were referring to this one.
BTW1: I couldn't find image width and height in that jeffrey's parser either, only the Raw Thermal Image Width in APP1
I'll have to look into it. Thought i don't know when will I have the time.
Hi Mike ! Indeed I was referring to the other APP1 section at the end. Would be great if you could look at it or give some clues on where I could look.
Hi. I'll be gone for two weeks or so but it'd be great if you'd like to look into it.
It appears to be a 3rd party extension by flir. I'm a bit confused why it's an app1 and not something like app20. It can be seen at the third screenshot where red marks the start of the app1 segment (FE E1). Except it's not followed by the standard "EXIF" signature but "FLIR".
You can use findAppSegment with various offsets in a loop and parse through the whole file to find all the segments. second arg is 1 for app1, third argument (condition) will have to check if there's the FLIR signature. Or make it truthy to get all segments. Fourth argument is a callback which you can use to modify output of the findAppSegment. I just now added fifth argument - offset - for you but that's the most I can do right now from a phone.
I suppose the data has the same structure as standard app1 so after that I think you can plug that segment into existing methods.
Good luck