XMP keywords not seen in File Explorer

Ask for help and post your question on how to use XnView MP.

Moderators: helmut, XnTriq, xnview

ymarushchenko
Posts: 1
Joined: Tue Nov 03, 2020 11:46 am

XMP keywords not seen in File Explorer

Post by ymarushchenko »

Hi!

I'm using the latest XnView MP version 0.97.1 (64 bit) and noticed something.

If I edit XMP keywords in XnView for a TIFF file (XMP only mode, no IPTC!), I see them in XnView on XMP tab under "dc" namespace as "subject" properties (that's expected), but Windows File Explorer (file properties tab) and some other software (e.g. digiKam) do not recognize and show them.

At the same time, if I assign the same keywords in digiKam (also XMP, stored under "dc" namespace with "subject" properties), I can see them both in XnView and File Explorer (and the file becomes searchable in Windows).

Why aren't keywords added by XnView recognized by Windows and digiKam? Encoding issue or some additional XMP properties are missing?

Thanks!
User avatar
xnview
Author of XnView
Posts: 45862
Joined: Mon Oct 13, 2003 7:31 am
Location: France

Re: XMP keywords not seen in File Explorer

Post by xnview »

could you send me a file with keywords from digikam?
Pierre.
krzysiu
Posts: 24
Joined: Thu Apr 07, 2016 8:52 pm

Re: XMP keywords not seen in File Explorer

Post by krzysiu »

Old question, abandoned by author, but maybe somebody else will look for an answer.

So, there's some places usually used for saving keywords:
IPTC:Keywords
IPTC:Subject
XMP:Subject
Exif:XPKeywords

When saving tags with edit XMP in XNView, it saves it as XMP:Subject, when by IPTC, it saves it as IPTC:Keywords.

I don't know about digikam, but I suspect it might save it in different places to increase compatibility. That's why tags saved with XN aren't visible in some apps. This approach have pros and cons. I personally prefer it like it's now, i.e. when saving XMP, it saves XMP and nothing more and using of standard places for such data.

As for the Windows, it uses only Exif:XPKeywords for tags, no XMP or IPTC. And it's basically only tool that does it. Other might save them there not because it's good, but to keep compatibility with Windows.

There's plenty of reasons why XPKeywords is not a good thing, like:
  • WIndows is known to corrupt metadata, so while you just read it, it's fine, but editing/adding can mess up your file
  • It's not standard - it's outside Exif typical set of tags and "XP" stands for Windows XP, when their questionable practices raged and this was probably done intentionally against standards, so people would have to stick with this system to keep their data.
  • Exif is not really place to save such things - it's the role of IPTC and/or XMP.
As XnViewMP is multiplatform, I don't see reason why it should use some weird Microsoft tag, even if compatibility plays a role here. I'm Windows user myself, so don't take me as Windows hater.

On the other hand, if you are 100% sure you just edit only XMP:dc:subject in DigiKam (which I doubt - maybe there's some compatibility setting you got enabled?), but it appears in Windows, it's not a good thing, because it would mean that DigiKam saves more than it should. It would be the best to test it using exiftool (cmd line: exiftool -s -G1 filename.tif).

You can populate XnView's XMP keywords to Windows' recognized tag, into all files with a single command:

Code: Select all

exiftool "-XPKeywords<XMP:Subject" -ext jpg -r .
Notes:
  1. Test it on small batch, always keep copy, I don't take responsibility - if you use it, it's up to you to make it safe
  2. It will create copy of each file, for safety reasons - you can avoid it by using (e.g. after "exiftool ") -overwrite_original
  3. It will go thought ALL jpg files, including subdirectories (-r is recorsive)
  4. If XPKeywords is already set, it will be overwritten by XMP Subject (i.e. XN tags). I'm not sure what would happen if there would be only Windows tags, but no XMP:subject. This could be avoided by -if command, but my time limit prevents me from fiddling more with that command.
  5. ext jpg means it will go thought all jpg files. If you want more extension, use something like -ext cr2 -ext jpg -ext mp4 - or to proecess every file that can be processed, just remove "-ext jpg" from example
  6. mind the dot at the end of command - it means "every file"
Last thing: why DigiKam doesn't recognize perfectly proper tags (i.e. under XMP:dc:subject)? That's their doing, not Pierre's fault. Xn's author does what XMP standard requires - saving tags to XMP's DublinCore subject field. To quote XMP's specification on dc:subject: "a list of descriptive phrases or keywords that specify the content of the resource".

Maybe you somehow saved effectively empty other tags for keywords and DigiKam prioritizes these empty ones? Who knows, I just don't think such respected tool as DK wouldn't recognize basically the most proper place for tags.