XMP Files - set what fields stored

Older bugs which are supposed to be fixed in 0.84. *** Please try to reproduce your bug and confirm the bug fix. ***

Moderators: XnTriq, helmut, xnview, Dreamer

psycik
Posts: 15
Joined: Tue Oct 27, 2020 3:20 am

XMP Files - set what fields stored

Post by psycik »

Is there a way to customise an XMP file to set what fields are introduced or not?
I'm using for adding categories, which works well.

But I'd like to also add in the photos original date taken as a field. I
User avatar
xnview
Author of XnView
Posts: 44572
Joined: Mon Oct 13, 2003 7:31 am
Location: France

Re: XMP Files - set what fields stored

Post by xnview »

for 'edit XMP' dialog?
Pierre.
psycik
Posts: 15
Joined: Tue Oct 27, 2020 3:20 am

Re: XMP Files - set what fields stored

Post by psycik »

Not sure I understand.

I would like to populate a field in an xmp file from the exif: date taken field.

My question is how can I customise the xmp template. Either in UI or on disk, I’m not bothered. How configure it so that it takes effect every time xnview writes an xmp file.
User avatar
michel038
XnThusiast
Posts: 1381
Joined: Tue Sep 27, 2016 8:18 am
Location: France

Re: XMP Files - set what fields stored

Post by michel038 »

every time xnview writes an xmp file

-XnView writes an xmp file when you use "Edit xmp" dialog (or when you assign a category with export option enabled, but then, only keywords are written)
So, if I understand, your question could be "is there a way to have a template (that copies Exif date into another field) always active when using Edit Xmp ? "
For now, I think it's not possible ...
psycik
Posts: 15
Joined: Tue Oct 27, 2020 3:20 am

Re: XMP Files - set what fields stored

Post by psycik »

Thanks.

I do see a load template/save template in the edit xmp dialog. And I've tried manually setting

Code: Select all

<photoshop:DateCreated>{EXIF:Date Taken}</photoshop:DateCreated>
In the hope that would work.

Also what I've might have found is in the tool bar customisation
Screenshot 2024-09-05 093721.png
I've set that to my edited XXMP (xmp template) and I do seem to be getting teh values in the xmp file when I use whatever this command is. I dontl quite understand what its doing.

Code: Select all

<x:xmpmeta xmlns:x="adobe:ns:meta/" x:xmptk="XMP Core 6.0.0">
   <rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#">
      <rdf:Description rdf:about=""
            xmlns:aux="http://ns.adobe.com/exif/1.0/aux/"
            xmlns:xmp="http://ns.adobe.com/xap/1.0/"
            xmlns:Iptc4xmpExt="http://iptc.org/std/Iptc4xmpExt/2008-02-29/"
            xmlns:MicrosoftPhoto="http://ns.microsoft.com/photo/1.0/"
            xmlns:dc="http://purl.org/dc/elements/1.1/"
            xmlns:lr="http://ns.adobe.com/lightroom/1.0/"
            xmlns:fwc="http://ns.fotoware.com/iptcxmp-custom/1.0/"
            xmlns:photoshop="http://ns.adobe.com/photoshop/1.0/">
         <xmp:Rating>0</xmp:Rating>
         <xmp:CreateDate>14-07-2019 2:17 PM</xmp:CreateDate>
         <xmp:ModifyDate>2024-09-02T15:48:26</xmp:ModifyDate>
         <Iptc4xmpExt:Event>Cyprus Paphos</Iptc4xmpExt:Event>
         <MicrosoftPhoto:Rating>0</MicrosoftPhoto:Rating>
         <dc:subject>
            <rdf:Bag>
               <rdf:li>Travel</rdf:li>
               <rdf:li>Cyprus</rdf:li>
               <rdf:li>Paphos</rdf:li>
               <rdf:li>Albums</rdf:li>
               <rdf:li>Cyprus Paphos</rdf:li>
               <rdf:li>2019 World Trip</rdf:li>
            </rdf:Bag>
         </dc:subject>
         <lr:hierarchicalSubject>
            <rdf:Bag>
               <rdf:li>Travel</rdf:li>
               <rdf:li>Travel|Cyprus</rdf:li>
               <rdf:li>Travel|Cyprus|Paphos</rdf:li>
               <rdf:li>Albums</rdf:li>
               <rdf:li>Albums|2019 World Trip|Cyprus Paphos</rdf:li>
               <rdf:li>Albums|2019 World Trip</rdf:li>
            </rdf:Bag>
         </lr:hierarchicalSubject>
         <fwc:CustomField1>14-07-2019 2:17 PM</fwc:CustomField1>
         <photoshop:DateCreated>14-07-2019 2:17 PM</photoshop:DateCreated>
      </rdf:Description>
   </rdf:RDF>
</x:xmpmeta>
You do not have the required permissions to view the files attached to this post.
User avatar
xnview
Author of XnView
Posts: 44572
Joined: Mon Oct 13, 2003 7:31 am
Location: France

Re: XMP Files - set what fields stored

Post by xnview »

so you would like to create a XMP template (with 'Edit XMP' dialog) and use {EXIF:Date Taken} field for 'Creation Date'?
Pierre.
psycik
Posts: 15
Joined: Tue Oct 27, 2020 3:20 am

Re: XMP Files - set what fields stored

Post by psycik »

Yes.

Or at least understand how and when a specific template is applied
User avatar
michel038
XnThusiast
Posts: 1381
Joined: Tue Sep 27, 2016 8:18 am
Location: France

Re: XMP Files - set what fields stored

Post by michel038 »

A template is a set of metadata that you have prepared and saved.
You've described an excellent method of associating a taskbar button with a template.
So when you select photos and click the button, the metadata are written in the photos if you use embedded metadata (or in the xmp sidecar files if you've chosen to create sidecars).

By default, xnview saves templates with "xmp" extension, which can be confusing because XMP files are usually companion (sidecar) files ...
Prefer to use the second proposal: xxmp which means "xmp template for xnview"

Another way to use templates is to open "Edit xmp", then load a template, and "Write" : same result, metadata are written. With this method, you can at the same time add other xmp metadata to the photos such as copyright, city, country ...

To copy only the field Exif:DateTaken into another xmp field, for example "Title" you can :
- In "edit XMP", create an xmp template with {EXIF:Date Taken} (chosen in the drop down menu) in the "Title" field, and create a toolbar button for this task, as you described it.

or, if you need to do this job only one time, select your whole set of photos, use "Metadata > Transfer" menu, with Xmp:Title as a target, and Exif > Image> date taken as source ...

:shock: ... why do you want to copy this date in a xmp field ?
psycik
Posts: 15
Joined: Tue Oct 27, 2020 3:20 am

Re: XMP Files - set what fields stored

Post by psycik »

I’m actually wanting other fields added. Like the photoshop:createdate.

I’m using immich.

When I assign categories in xnview and save as xmp. It adds an xmp create and modified date to the xmp.

For whatever reason even though a picture has the date taken in exif. Immich users the create date for the xmp file.

So by adding the photoshop namespace create date, and forcing the xmp create date field to be the exif date the picture was taken. I can get over (imo) an issue with immich.

So the only enhancement I could ask of xnview is that there is an option that whenever an xmp is created that this configured template with my enhancements could be used. Else use a default.

But I have a manual work around that I think will work for me
User avatar
michel038
XnThusiast
Posts: 1381
Joined: Tue Sep 27, 2016 8:18 am
Location: France

Re: XMP Files - set what fields stored

Post by michel038 »

I understand now.
I should have read your posts more carefully, your question was clearly formulated.

I made some tests and I think that the behaviour of XnViewMp is sometimes not correct ...
I opened a bug report here viewtopic.php?f=62&t=47752

For now, the only way to have exif:date taken copied into xmp:create date is to use first "Edit XMP" (and "Write" button) on a photo that has no xmp sidecar file, so, the sidecar is created with xmp create date containing exif date taken, and xmp modify date will get current timestamp.

I haven't yet studied what you call photoshop namespace...
psycik
Posts: 15
Joined: Tue Oct 27, 2020 3:20 am

Re: XMP Files - set what fields stored

Post by psycik »

I can’t find how found it originally. But this lists the various namespaces and fields.

https://www.exiftool.org/TagNames/XMP.html#photoshop
This is the photoshop namespace I introduced in my xxmp
Template.
User avatar
michel038
XnThusiast
Posts: 1381
Joined: Tue Sep 27, 2016 8:18 am
Location: France

Re: XMP Files - set what fields stored

Post by michel038 »

Thank you.
I can see now that XMP:CreateDate is different from Xmp-Photoshop DateCreated...
I'm going to make further investigations.

For now, a possible workaround :
Use "Edit IPTC" dialog, with Options > Mode > Xmp Only. Here you can edit "Date/Time > Created date/time" that updates Xmp-Photoshop DateCreated, maybe with a new Template button ...

My bug report post was also edited with new informations. ( viewtopic.php?f=62&t=47752 )
User avatar
xnview
Author of XnView
Posts: 44572
Joined: Mon Oct 13, 2003 7:31 am
Location: France

Re: XMP Files - set what fields stored

Post by xnview »

ok, i'll add Photoshop.DateCreated field
See issue for current status and some details.
Pierre.
User avatar
xnview
Author of XnView
Posts: 44572
Joined: Mon Oct 13, 2003 7:31 am
Location: France

Re: XMP Files - set what fields stored

Post by xnview »

This problem is supposed to be fixed in XnView MP 1.8.1. Please check and confirm the bug fix here.
Pierre.