You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
first of all congratulations to your great effort of porting exiftool to Javascript! Can't wait to see more progress on this project. Just a quick idea from my side: why don't you import the tag data (i.e. name, data structure, meaning of a tag) from exiftool instead of hard-coding it in your source code?
I see a few advantages of this approach:
additional tags from the database could rapidly increase the tag coverage from exiftool.js.
you make sure to match all possible values for a tag are matched (e.g. all possible keys/meanings for the compression tag - see below)
you get tag translations in 10 languages for free.
How to do it?
exiftool provides the -listx option to dump out (parts of) its tag database to xml, e.g.
exiftool -listx -EXIF:All
would dump out all exif tag info in an xml structure like this:
<?xml version='1.0' encoding='UTF-8'?>
<taginfo>
<tablename='Exif::Main'g0='EXIF'g1='IFD0'g2='Image'>
<desclang='en'>Exif</desc>
<desclang='it'>Exif</desc>
<!-- some tags omitted - tag id = decimal version of hex identifier of tag (0x0103 == 259)-->
<tagid='259'name='Compression'type='int16u'writable='true'>
<desclang='en'>Compression</desc>
<desclang='cs'>Kompresní algoritmus</desc>
<desclang='de'>Komprimierungsschema</desc>
<desclang='es'>Compresión</desc>
<desclang='fi'>Pakkausskeema</desc>
<desclang='fr'>Schéma de compression</desc>
<desclang='it'>Compressione</desc>
<desclang='ja'>圧縮計画</desc>
<desclang='ko'>압축 설계</desc>
<desclang='nl'>Compressie schema</desc>
<desclang='pl'>Algorytm kompresji</desc>
<desclang='ru'>Схема сжатия</desc>
<desclang='sv'>Komprimeringsschema</desc>
<desclang='tr'>Sıkıştırma planı</desc>
<desclang='zh_cn'>压缩方案</desc>
<desclang='zh_tw'>壓縮方式</desc>
<values>
<!-- key id maps a numerical tag value to an explanation-->
<keyid='1'>
<vallang='en'>Uncompressed</val>
<vallang='cs'>Bez komprese</val>
<vallang='de'>Nicht komprimiert</val>
<vallang='es'>Sin comprimir</val>
<vallang='fr'>Non compressé</val>
<vallang='it'>Non compresso</val>
<vallang='ja'>非圧縮</val>
<vallang='ko'>무압축</val>
<vallang='nl'>Niet gecomprimeerd</val>
<vallang='pl'>Bez kompresji</val>
<vallang='ru'>без сжатия</val>
<vallang='sv'>Ingen komprimering</val>
<vallang='tr'>Sıkıştırılmamış</val>
<vallang='zh_cn'>未压缩</val>
<vallang='zh_tw'>未壓縮</val>
</key>
<keyid='2'>
<vallang='en'>CCITT 1D</val>
</key>
<keyid='3'>
<vallang='en'>T4/Group 3 Fax</val>
<vallang='it'>Fax T4/Group 3</val>
</key>
<keyid='4'>
<vallang='en'>T6/Group 4 Fax</val>
<vallang='it'>Fax T6/Group 4</val>
</key>
<keyid='5'>
<vallang='en'>LZW</val>
</key>
<!-- some keys omitted-->
</values>
</tag>
</table>
</taginfo>
Obviously one would then have to convert the xml file into multiple JSON files (maybe a default one in English, plus some separate i18n files for the other languages). Finally you have to enhance your Exif parser to understand the format of the JSON files.
In case you are interested I can try to compile a pull request.
Best,
Franz
The text was updated successfully, but these errors were encountered:
Your suggestion is a good one and I'd certainly appreciate any help you can offer.
However, the first bug that must be fixed is #8 The test suite is not deterministic which means it cannot be trusted! Once that is reliable, then we can make changes without fear of regression etc.
yeah, I also remembered you from our conversation and of stolencamerafinder.net ;-) Glad to hear that you are still committed to photography and metadata. I hope I can help to land some progress on exiftool.js. I wasn't aware of redaktor's fork, but will certainly investigate it, since he already has done some import of exiftool's tag database.
I will also check your testsuite bug. Unfortunately, the coverage testsuite feels a bit bloated at the moment with approx 7000 images, so its pretty hard to work with it. See my other issue #19 for an improvement suggestion.
Hi Matt,
first of all congratulations to your great effort of porting exiftool to Javascript! Can't wait to see more progress on this project. Just a quick idea from my side: why don't you import the tag data (i.e. name, data structure, meaning of a tag) from exiftool instead of hard-coding it in your source code?
I see a few advantages of this approach:
How to do it?
exiftool provides the -listx option to dump out (parts of) its tag database to xml, e.g.
would dump out all exif tag info in an xml structure like this:
Obviously one would then have to convert the xml file into multiple JSON files (maybe a default one in English, plus some separate i18n files for the other languages). Finally you have to enhance your Exif parser to understand the format of the JSON files.
In case you are interested I can try to compile a pull request.
Best,
Franz
The text was updated successfully, but these errors were encountered: