exif2xmp - missing entry ?

Started by herb, October 07, 2016, 03:33:18 PM

Previous topic - Next topic

herb

Hello Phil,

Is it possible that in argumentfile exif2xmp.args 1 entry is missing?

I think that somewhere after -XMP-exif:all < EXIF:all
one of the following lines should be given, in order to have a correct value of tag: -XMP-exif:DateTimeOriginal
(1) -XMP-exif:DateTimeOriginal < Composite:SubSecDateTimeOriginal
(2) -XMP-exif:DateTimeOriginal < ${CreateDate}${OffsetTimeOriginal}

As I never worked with sub-seconds I cannot decide which is the proper line.

Best regards
Herb

Phil Harvey

Hi Herb,

Hmmm.  I wonder how hard we should try to populate XMP-exif when these tags are already being copied to better locations.  As well as this, the argfile isn't even trying to write XMP-exif:DateTimeDigitized.

Also, this has brought to light a newly introduced bug in the reverse translation (arg_files/xmp2exif.args) which I will fix in the next release (i got the wrong group for the date/time tags).

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

herb

Hello Phil,

Sorry annoying you again - and doing this on a sunny sunday.
I need your help again for a better understanding of the args files of version 10.30: exif2xmp and xmp2exif:

(1) xmp2exif: e.g.: line -Composite:SubSecCreateDate < XMP-xmp:CreateDate
I do not understand what is the advantage of writing XMP-xmp:CreateDate into a Composite tag instead into the corresponding Exif tag as done in the previous version?

(2) exif2xmp: tag XMP-exif:DateTimeOriginal
I still think as long as this tag is created it should also contain the timezone (as long as it is available as Exif:OffsetTimeOriginal).
Or why am I wrong?

Best regards
Herb

Phil Harvey

Quote from: herb on October 16, 2016, 04:50:38 AM
Sorry annoying you again

Don't be.  Glad to help.  Questions like this give me a chance to document my design decisions.

Quote(1) xmp2exif: e.g.: line -Composite:SubSecCreateDate < XMP-xmp:CreateDate
I do not understand what is the advantage of writing XMP-xmp:CreateDate into a Composite tag instead into the corresponding Exif tag as done in the previous version?

I made the Composite tag writable for 10.30.  If you check the Composite Tags documentation you'll see that it not only write EXIF:CreateDate, but also SubSecTimeDigitized and OffsetTimeDigitized.

Although you may copy a date/time string to each of these separately (because they have been designed to pull out the appropriate parts from a full date/time string when writing), the advantage of setting them all together via a Composite tag can be seen if the date/time string is missing one or more of the components.  For example, if I have a date/time string of "2000:01:02 03:04:05.678" and write this separately to EXIF:CreateDate, SubSecTimeDigitized and OffsetTimeDigitized, I get this:

CreateDate = "2000:01:02 03:04:05"
SubSecTimeDigitized = "678"
OffsetTimeDigitized <not written>

Which may seem correct, but think about what happens if OffsetTimeDigitized already existed in the file.  Then you get a full date/time value with a totally unrelated offset.  By contrast, Writing Composite:SubSecCreateDate, you get this:

CreateDate = "2000:01:02 03:04:05"
SubSecTimeDigitized = "678"
OffsetTimeDigitized <deleted>

and any unrelated offset time is deleted from the file.  So in this case, all 3 tags are consistent with the full date/time string that was written.

But if there are any unwanted side effects, please let me know.

Quote(2) exif2xmp: tag XMP-exif:DateTimeOriginal
I still think as long as this tag is created it should also contain the timezone (as long as it is available as Exif:OffsetTimeOriginal).
Or why am I wrong?

I remember reading in either the XMP or MWG specification that if the time zone is not known then the XMP date/time value should be stored without it.  This makes some sense because adding the wrong one would give an incorrect time.  There is some value in knowing that the time zone is unknown.

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

herb

Hello Phil,

thanks for your detailed explanations. I fully agree with you.

But line (2) of my very first post
-XMP-exif:DateTimeOriginal < ${CreateDate}${OffsetTimeOriginal}
does only add a timezone in case of it exists.
I hope, I am right.

Best regards
Herb

Phil Harvey

Hi Herb,

Quote from: herb on October 16, 2016, 09:59:37 AM
-XMP-exif:DateTimeOriginal < ${CreateDate}${OffsetTimeOriginal}
does only add a timezone in case of it exists.
I hope, I am right.

Oh, I missed what you were saying.  Yes, you are right.  But doing this won't result in a value with sub-seconds if they existed.

I also remembered another reason why I didn't want to use the "$" syntax in the argfile -- you will get warning messages for missing tags.

Maybe exif2xmp.args needs some work.  I will think about this more after the Exif 2.31 for XMP specification comes out.

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

herb

Hello Phil,

Doing some tests with IMatch I have seen that IMatch has sometimes problems with timezone values.

So I remembered this post and I hope not to annoy you asking for some news on the topic.

Best regards
Herb

Phil Harvey

The Exif 2.31 for XMP specification has not yet been released, and I haven't done any more work on this.

Can you be more specific about the iMatch problems?

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

herb

#8
Hello Phil,

of course can I give you same info to the IMatch timezone problems. In easy words:
- IMatch sets XMP:CreateDate (inside IMatch database only) from EXIF date/time tags and adds a timezone value from its settings.
- sends some Exiftool commands that have to use argumentfile exif2xmp.args and others.
  now Exiftool prepares XMP:CreateDate from EXIF (without a timezone value)
- updates tags modified by user
- but does not update XMP:CreateDate
- reads all new tags again to synchronize with IMatch database and XMP:CreateDate has lost timezone information. 

BUT analysing the commands IMatch sends to Exiftool I have seen that this is not a fault in Exiftool.
Only IMatch can solve this problem.

Best regards
Herb

herb

Hello Phil,

I continued my tests with IMatch and have seen that the EXIF timezone tags: OffsetTime, OffsetTimeOriginal and OffsetTimeDigitized have been created.
Looking into the commands of IMatch to Exiftool I have not seen, that they were set explicitly.
So I guess that Exiftool does create them within one argumentfile: I guess xmp2exif.args

Now I need your help:
Please tell me from which XMP tags these EXIF timezonetags are derived from?

Thanks for your help in advance
Best regards
Herb

Phil Harvey

Hi Herb,

Hi Herb,

If you look at xmp2exif.args, you will see that it writes the Composite SubSec tags:

-Composite:SubSecDateTimeOriginal < XMP-photoshop:DateCreated
-Composite:SubSecCreateDate < XMP-xmp:CreateDate
-Composite:SubSecModifyDate < XMP-xmp:ModifyDate


The Composite tag name documentation details which tags are affected by each Composite tag.

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

herb

Hello Phil,

thanks for your help.

Best regards
Herb

Phil Harvey

Quote from: Phil Harvey on October 16, 2016, 12:11:23 PM
I will think about this more after the Exif 2.31 for XMP specification comes out.

The Exif 2.31 for XMP specification was finally released in August 2017.  (More than a year after the Exif 2.31 specification!)

ExifTool 11.03 will support the new tags.

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