ExifTool Forum

ExifTool => Newbies => Topic started by: toyotadesigner on December 04, 2017, 02:37:27 AM

Title: Copy TAG from NEF and create new TAG with value in TIFF
Post by: toyotadesigner on December 04, 2017, 02:37:27 AM
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?
Title: Re: Copy TAG from NEF and create new TAG with value in TIFF
Post by: toyotadesigner on December 04, 2017, 04:12:02 AM
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?

Title: Re: Copy TAG from NEF and create new TAG with value in TIFF
Post by: Hayo Baan on December 04, 2017, 07:10:32 AM
Usually these warnings indicate errors in the file caused by badly written image editing software (not by exiftool...).
Title: Re: Copy TAG from NEF and create new TAG with value in TIFF
Post by: Phil Harvey on December 04, 2017, 07:14:48 AM
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
Title: Re: Copy TAG from NEF and create new TAG with value in TIFF
Post by: toyotadesigner on December 04, 2017, 01:28:14 PM
@ 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.