ExifTool Forum

ExifTool => The "exiftool" Application => Topic started by: gastexif on September 24, 2020, 03:39:02 AM

Title: node-exif and exiftool
Post by: gastexif on September 24, 2020, 03:39:02 AM
Hi All,
I have an existing application that uses node-exif https://www.npmjs.com/package/exif (https://www.npmjs.com/package/exif).

I am trying to use the above but came across the fact that I can't see all tags that are available using the regular exiftool when I look at the same image metadata.
For example, using exiftool to look at Sony's "MeteringMode" I get the value "Multi-segment" but the same tag in node-exif yields the number "5". But looking here https://exiftool.org/TagNames/Sony.html (https://exiftool.org/TagNames/Sony.html) for Sony's tags documentation, MeteringMode is an int8u value where the value "1" corresponds to "Multi-segment".

Similar confusions happen for other tags like "WhiteBalance".

Aside from this, some tags simply do not appear at all in node-exif, like "Quality" or "HDR".

Would anyone have a pointer on resolving such issues?

Attached are examples files from the same image.

Tnx !

Title: Re: node-exif and exiftool
Post by: StarGeek on September 24, 2020, 10:27:45 AM
Sounds like it might be FAQ #3 (https://exiftool.org/faq.html#Q3).  There may be duplicate tags in different groups.  Make sure you see all tags with the -a (-duplicates) option (https://exiftool.org/exiftool_pod.html#a---a--duplicates---duplicates) and the groups they belong to with the -G (-groupNames) option (https://exiftool.org/exiftool_pod.html#G-NUM-:NUM...--groupNames).

Using WhiteBalance as an example, in my NEF file there are two entries.  Looking at the human readable output (printConv in exiftool terms)
[Nikon]         WhiteBalance                    : Auto
[ExifIFD]       WhiteBalance                    : Auto


But looking at the raw values with the -n (--printConv) option (https://exiftool.org/exiftool_pod.html#n---printConv)
[Nikon]         WhiteBalance                    : AUTO
[ExifIFD]       WhiteBalance                    : 0
Title: Re: node-exif and exiftool
Post by: gastexif on September 24, 2020, 03:34:41 PM
Thank you StarGeek !

I get:
user@dell:~/Desktop$ exiftool -a -n -G ~/Desktop/image.jpeg | grep White

[EXIF]          White Balance                   : 1
[MakerNotes]    White Balance Fine Tune         : 0
[MakerNotes]    White Balance                   : 16
[MakerNotes]    White Balance                   : 5



yet there is no "WhiteBalance" with the value of 1 here https://exiftool.org/TagNames/Sony.html#WhiteBalanceSetting
Title: Re: node-exif and exiftool
Post by: StarGeek on September 24, 2020, 04:28:46 PM
You would look for the EXIF:WhiteBalance entry on the EXIF tags page (https://exiftool.org/TagNames/EXIF.html), not the Sony page.
Title: Re: node-exif and exiftool
Post by: gastexif on September 25, 2020, 01:07:15 AM
Excellent Thank You