Copy TAG from NEF and create new TAG with value in TIFF

Started by toyotadesigner, December 04, 2017, 02:37:27 AM

Previous topic - Next topic

toyotadesigner

I am stuck  :-\

I tried to copy the value of the TAG '-FocusDistance' from a NEF file and create a new TAG '-SubjectDistance' in the TIFF with the value of the TAG '-FocusDistance'

I want all files in a DIR to be processed, so that only matching file names will be processed.

I tried this:

exiftool -FocusDistance %d%f.NEF -wm cg -SubjectDistance '-FocusDistance+<=%d%f.NEF' -ext tif . [DIRECTORY]

It does not work at all.

Edit: My apologies, I forgot to note the system: iMac/OS X El Capitan, Exiftool 10.67

It would be nice to have the subject distance in the TIFF file, because I would be able to display it in the thumbnails of XnView MP, which - unfortunately - can only extract a SUBJECT DISTANCE.

Do you have any solution?

toyotadesigner

OK, I could move a little bit further: The the value from the SRCTAG has been copied, the new Tag in the DSTTAG has been created and the values have been stored into the DSTTAG with this command:

exiftool '-FocusDistance>SubjectDistance' -overwrite_original_in_place -ext tif [DIRECTORY]

However, I get following message with warnings:

Warning: Bad PreviewIFD directory - /Users/designer/Desktop/exiftest/_DSC6735.tif
Warning: Error reading PreviewIFD. IFD dropped. - /Users/designer/Desktop/exiftest/_DSC6735.tif
Warning: Bad PreviewIFD directory - /Users/designer/Desktop/exiftest/_DSC6741.tif
Warning: Error reading PreviewIFD. IFD dropped. - /Users/designer/Desktop/exiftest/_DSC6741.tif
    1 directories scanned
    2 image files updated

What did I do wrong that exiftool complains about the 'Bad PreviewIFD'? Is there any solution to get rid of this?


Hayo Baan

Usually these warnings indicate errors in the file caused by badly written image editing software (not by exiftool...).
Hayo Baan – Photography
Web: www.hayobaan.nl

Phil Harvey

The PreviewIFD contains only a preview image and no other useful information, and is easily corrupted if the file is rewritten by other applications.

- 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 ($).

toyotadesigner

@ Hayo and Phil

Thank you very much for your information. So I will use the -m option.

I have checked the output files, the preview images seem to be ok. Maybe it is a problem of the Nikon RAW converter, because Hugin (panorama tool) spills out similar messages regarding the bit depth of the processed TIFF files (16/48 bit).

Now I will try to integrate the DOF TAG as well.