ExifToolVersion should be a string

Started by jwag, April 18, 2019, 11:06:13 AM

Previous topic - Next topic

jwag

I recently upgraded to version 11.30.
When dumping tags of an image (using -hex -json) I see:

  "ExifTool": {
    "ExifToolVersion": {
      "desc": "ExifTool Version Number",
      "id": "ExifToolVersion",
      "val": 11.30
    }
  }

This is problematic since according to JSON spec - there is nothing required around precision (and I could argue versions aren't really decimal). So for example
using standard python:

json.dumps(V)
'{"ExifTool": {"ExifToolVersion": {"desc": "ExifTool Version Number", "id": "ExifToolVersion", "val": 11.3}}}'

the trailing 0 is gone.

Now - I understand completely that this is a backwards compat nightmare - probably the only real fix is to introduce a new tag name. Having a string would also allow for having exiftool versions follow semantic versioning standards

Phil Harvey

The trailing zero really isn't significant.  ExifTool 11.3 is the same as 11.30.  It is easily differentiated from version 11.03 either way.  I always use only 2 digits for the minor version number.

For what it's worth, 11.30 is only the standard format I like to use.  This translates to a version of 11.3.0.0 for the Windows app.

- Phil
...where DIR is the name of a directory/folder containing the images.  On Mac/Linux/PowerShell, use single quotes (') instead of double quotes (") around arguments containing a dollar sign ($).