Metadata Varies Slightly When Copying

Started by Abby, April 09, 2020, 01:32:50 PM

Previous topic - Next topic

Abby

Hello All,

I am very new to ExifTool, so maybe (hopefully!) there is a relatively simple fix for my issue.  I have recently made a python script to watermarked copies of jpg images and I am using a batch file to use ExifTool to transfer the metadata.  Unfortunately, when I copy metadata from the original image to the new image, metadata values change ever so slightly.  A few examples would be ExposureBiasValue going from .344 to .34375 or GPSLatitude increasing by just .0000002656 seconds.  Because these photos are used for analysis, I would like to achieve the best accuracy possible.  Here is my current ExifTool call:

exiftool -F -tagsfromfile src.jpg -all:all dst.jpg


Any help would be appreciated!

Phil Harvey

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

Abby

Unfortunately, that doesn't appear to have worked.  The gps coordinates are off by as much as they were before.  Here is the adjusted code for reference:


exiftool -F -n -tagsfromfile src.jpg -all:all dst.jpg

Phil Harvey

If you send me the image I can tell you exactly what is happening.  (my email is philharvey66 at gmail.com)

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

Phil Harvey

I got your sample.

First, I suggested using the -n option to avoid the print conversion and inverse print conversion when copying the value (see here for a diagram of the metadata flow), which may avoid some rounding problems.

However, the numbers are still passed as real values when copying, but some EXIF tags (such as GPSLatitude/Longitude and ExposureTime) must be translated to rational values when writing.  When rationalizing a value, ExifTool attempts to maintain 8 digits of precision, but beyond that there may be rounding errors.  This error should be insignificant for most purposes.  For example, the difference in your GPSLatitude is 0.008 mm, which is orders of magnitude smaller than the accuracy of any GPS system.

I have an item on my to-do list to add a feature to allow rational values to be copied exactly, but it has sunk to item 216 on the list because until now nobody has complained about these insignificant round-off errors.

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

Abby

Thank you for all of your help!  I will keep this in mind moving forward.