How to set tiff tags from json in exiftool Ubuntu

I want to convert an image to dng. The best way I found was to use exiftool. It is supposed to support json to define all tags for the dng/tiff. I found this command:

exiftool -json=exiftool_metadata.json -overwrite_original image.dng

What should be the exact format of the json? And how can I find the exact keywords to use to edit the tags? I tried something like this:

{
  "SourceFile": "image.dng",
  "TIFF:ImageWidth": 1920,
  "TIFF:MaxSampleValue": 65535,
  "TIFF:StripByteCounts": 3840
}

But when I run the command, I only get

0 image files updated
1 image files unchanged

Upvotes: 0

Views: 56

Answers (1)

StarGeek
StarGeek

Reputation: 5791

There is no "TIFF" group name in exiftool. See the Tags Names page which has links to all the group pages, which are the lists of tags in those groups.

Most "TIFF" tags are included on the EXIF Tags page. From that page

The table below lists all EXIF tags. Also listed are TIFF, DNG, HDP and other tags which are not part of the EXIF specification, but may co-exist with EXIF tags in some images.

Note that the number of tags that exiftool knows is extensive, currently sitting at 28,214, though not all are writable. Your best bet is to look at a file that already has the tag names you want, export the output with the command from FAQ #3 while adding the -json option and take a look at the output.

You can also look up tag names on the appropriate tag pages, though that can be difficult if you don't know what you're looking for. For a tiff image, you would want to concentrate on the EXIF tags (linked above) and the XMP tags. The older IPTC IIM tags can also be used, but it is recommended to use the corresponding XMP tags.

Upvotes: 1

Related Questions