Closed atombrenner closed 6 months ago
Thanks for all your research Christian, this seems like a sensible idea to me. As you say it would be a semver-major change.
Exiv2 is (or at least has been) well-maintained so would be a suitable canonical source of truth.
The underlying tag data is from src/tags_int.cpp and the docs appear to rely on this via the output of samples/taglist.cpp. These are GPL so parsing the source code directly is off-limits, however the HTML uses the output of the code rather than the code itself so your suggested approach to parse the docs avoids any possible licensing virality.
Closing as this was implemented in v2.0.0, thanks for all your work on this @atombrenner
Use standard Exif group and tag names generated from Exiv2 metatdata
Note: This is a RFC and not a real issue. My intention is to get feedback about an idea I had when tried to solve my own issue #27 for better Typescript support.
While working on this issue I noticed some things that made me scratch my head
So I spent some time looking at exiftool which seems to be the original inspiration to this project.
Then I found the nice Exiv2 project with a working link to the Exif spec and a well structured list of all standard Exif tags together with type information.
When I realised that the exiv2 cli was already installed on my machine, I used it to compare the ouptut of exiv2 and exif-reader with
exiv2 -p e some.jpg
.IMHO the exiv2 project is trying to follow the spec one to one, while the exiftool project diverges a bit. For example the tag 0x0132 is called
DateTime
in Exif and Exiv2, butModifyDate
in exiftool and exif-reader. Exiftool lists tags that are not found in the specs. The exiv2 project provides structured access to the data type of each tag, my original motiviation for starting all this.So my proposal is, can we just generate the
tags.js
file and the type definitionindex.d.ts
based on the metadata from eviv2? That would give us some benefitsIt also has some drawbacks:
InkSet
,InkNames
orFaxRecvParams
) now no longer have a tag name (but would still be accessible by tag id if they are actually inside a file)I prepared a branch of my proposed change. Please have a look.
I think this change would align this project with the Exif Spec, but I fully understand that this is a breaking change that will cause effort for users of this project. In most cases it's just adjusting tag names. The following table of changed tag names will help with that. Only if someone relied on the edge case, when a file really contains different values for different tags with the same name (e.g. WhiteBalance), they will experience a behavioural change.
Duplicate Tag Names
Changed Tag Names
New Tag Names
Non standard Tag Names (removed)
A sampling of those values on https://exiftool.org/TagNames/EXIF.html indicates that they are either offsets to vendor specific IFDs or are not part of any IFD (basicly undocumented on exiftool)