


I'm not sure what you intended, but there can be only one % for each value to be rendered It looks like the issue is with the seconds field, for which you have the format specifier %0d%02.5f. (Several other SO answers agree with that "cheat sheet.") But I didn't bother to save the script "for future reference." Someone's " cheat sheet" said that my second digit should be the total width, including the decimal point, so I changed the seconds to "%08.5f" but all that did was add another bogus zero in front of the decimal point, e.g., 510.00000→5100.00000 (width of ten, not eight!).Ī few years ago, I did something similar, and got the correct results. The default format for that file is 42 deg 37' 28.39" N, 2 deg 5' 51.96" W The other problem is the false fractional part. One problem is the bogus zero inserted between floor(seconds) and its decimal point. The leading zero for latitude isn't needed, but it is there because longitude uses the same format string. (I don't need five decimal places-I just put that in temporarily to see whether any of the cameras wer being dishonest about the precision.) The three unnecessary spaces can't be helped they are outside the format string’s control, but I did get rid of others that were in the default. The format string I tried, and one of the results: -coordFormat "%03d°%02d′%0d%02.5f″" I would like to make them the same width and without unnecessary spaces. I am trying to get GPS coordinates from image files with exiftool. (Or else it's a bug in exiftool 10.55 and 10.77) Modify Date : 2009:03:07 07:08:32.00 #MinusĮxiftool "-AllDates -= 5:7:8 16:0:0" -overwrite_original *.JPGĮxiftool "-AllDates += 5:7:8 16:0:0" -overwrite_original *.Apparently I am misunderstanding the printf man page. IMG_1745.JPG 4752 x 3168 24bit Exif N 2245978 Premature end of JPEG file Set File Modification Date to the Exif Date # -r | Recursive # Format: Destination (which should be written) < Source Date(which should be read from)Įxiftool -r "-FileCreateDate Checking JPEG File integrity jpeginfo -c * | grep -v Exiftool has become an irreplaceable companion for organising and checking my image files.