mapillary_tools icon indicating copy to clipboard operation
mapillary_tools copied to clipboard

wrong datetimeoriginal format

Open Stefal opened this issue 7 years ago • 5 comments

Basic information

  • Release version: 0.1.2
  • System: Windows

Steps to reproduce behavior

  1. Choose an image with a subsectimeoriginal value
  2. process the file for directions (bearing)
  3. Check the datetimeoriginal

Expected behavior

The DateTimeOriginal exif tag should stay the same

Actual behavior

  1. I don't understand why the script rewrite the datetimeoriginal tag. It should not.
  2. The new datetimeoriginal tag is wrongly formatted with some subsecond value datetimeoriginal

Stefal avatar Aug 02 '18 21:08 Stefal

hi, the subseconds are derived in case of identical timestamps, this is required to avoid having jumps back and forward in the sequence unfortunately i can not accept your PR, since it results in ignoring milliseconds in the timestamp

jernejaMislej avatar Aug 21 '18 08:08 jernejaMislej

You can't add milliseconds in the datetimeoriginal exif tag, you must use the subsectimeoriginal exif tag to do this. From the exif spec:

DateTimeOriginal The date and time when the original image data was generated. For a DSC the date and time the picture was taken are recorded. The format is "YYYY:MM:DD HH:MM:SS" with time shown in 24-hour format, and the date and time separated by one blank character [20.H]. When the date and time are unknown, all the character spaces except colons (":") should be filled with blank characters, or else the Interoperability field should be filled with blank characters. The character string length is 20 Bytes
including NULL for termination. When the field is left blank, it is treated as unknown.

Stefal avatar Aug 21 '18 12:08 Stefal

I made a new Pull Request: #280 This one send the microsecond to the subsectimeoriginal exif tag.

Stefal avatar Aug 24 '18 16:08 Stefal

hi thanks for your feedback, i will need to do some extra work to be able to merge that PR, will do asp and let you know

jernejaMislej avatar Aug 26 '18 21:08 jernejaMislej

hi i fixed the bug with double subseconds being added and released 0.1.7, but did not change reading and writing subseconds from date/time original if they exist, i will adjust that in the next release so if subseconds are already present in date/time original they are read instead of the subseconds tag value, but if they are no there, then subseconds tag value is added if present and written to date/time original in the next release i will change so that date/time original is not written back with subseconds if they were not originally there thank you for contributing, please install the latest version and let me know if any issues

jernejaMislej avatar Sep 17 '18 23:09 jernejaMislej