Author Topic: "tagsfromfile" rounds off & partially copies tags - who's at fault?  (Read 2129 times)

photogger

  • Jr. Member
  • **
  • Posts: 10
Hi,

I ran into problem where only partial metadata is being copied from SOURCE to TARGET when using the "--tagsfromfile SOURCE.NEF TARGET.TIFF" command. It also seems to round off numbers (i.e., 160.061349693252 becomes 160)

For instance:

Code: [Select]
>exiftool -v -tagsfromfile SOURCE.NEF TARGET.TIFF
Setting new values from SOURCE.NEF
======== TARGET.TIFF
Rewriting TARGET.TIFF...
  Editing tags in: Composite Ducky ExifIFD File FotoStation GPS IFD0 IFD2 IPTC J
FIF KDC_IFD KodakIFD MIE-Camera MIE-Doc MIE-Flash MIE-GPS MIE-Geo MIE-Image MIE-
Lens MIE-Main MIE-Preview MakerNotes MetaIFD PDF PNG Photoshop PostScript SubIFD
 SubIFD1 SubIFD2 TIFF XMP
  FileType = TIFF
  MIMEType = image/tiff
  ExifByteOrder = II
  Rewriting IFD0
  Creating XMP
  Creating IPTC
  Creating ExifIFD
  Creating GPS
  Copying 1 image data blocks
    1 image files updated

Comparing the two files...

Code: [Select]
>exiftool -all:GpsAltitude FILE.NEF
GPS Altitude                    : 160.061349693252 m
GPS Altitude                    : 160.0613497 m
GPS Altitude                    : 160 m Above Sea Level

Code: [Select]
>exiftool -all:GpsAltitude FILE.TFF
GPS Altitude                    : 160 m
GPS Altitude                    : 160 m Above Sea Level

This makes Lightroom, for instance, display different altitude (525.1ft for SOURCE and 524.9 for TARGET). Not a big difference but things don't look so good for the "Lens" tag that breaks Lightroom's lens correction since 17.0-50.00 mm f/2.8 from SOURCE becomes 17-50mm f/2.8 in TARGET.

Am I doing something wrong?

Phil Harvey

  • ExifTool Author
  • Administrator
  • ExifTool Freak
  • *****
  • Posts: 14438
    • ExifTool Home Page
Re: "tagsfromfile" rounds off & partially copies tags - who's at fault?
« Reply #1 on: June 17, 2012, 08:53:34 PM »
Tags are copied by the value you see when extracting.  Typically, if you want to avoid rounding, add -n or use -TAG# when copying.

About the Lens tag, I can't say exactly why the zeros are getting dropped.  The XMP:Lens is a simple string that ExifTool does not tamper with.

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

photogger

  • Jr. Member
  • **
  • Posts: 10
Re: "tagsfromfile" rounds off & partially copies tags - who's at fault?
« Reply #2 on: June 17, 2012, 10:45:03 PM »
The -n worked.

Still don't know what to do with the Lens field(s). I sent you a private message with a link to the RAW file and would appreciate if you could check it out.

Thank you.

Phil Harvey

  • ExifTool Author
  • Administrator
  • ExifTool Freak
  • *****
  • Posts: 14438
    • ExifTool Home Page
Re: "tagsfromfile" rounds off & partially copies tags - who's at fault?
« Reply #3 on: June 18, 2012, 07:49:33 AM »
I got the NEF file, thanks.  This file contains no XMP, and the lens information is stored entirely in the Nikon maker notes.

The Nikon:Lens tag is extracted as "17-50mm f/2.8", and copied to XMP:Lens by your command.  I can't comment on LightRoom, but this may be a more appropriate way to copy lens information in your case:

exiftool -v -tagsfromfile SOURCE.NEF -all "-lens<lensid" TARGET.TIFF

Which will copy "Sigma 17-50mm F2.8 EX DC OS HSM" into XMP:Lens.

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