XPKeywords not writing for a GIF file

Started by Paul Wittle, June 14, 2019, 06:38:18 AM

Previous topic - Next topic

Paul Wittle

I've been trying to add keywords to various file formats and the tool works fine for JPG etc but not so well for GIF and PNG.

Some documentation suggests that GIF doesn't support EXIF data and by implication I would think XMP but Exiftool was able to write out to XMP:Keywords fine.

When writing to XPKeywords it just says "0 image files updated" rather than "Tag 'XPKeywords' does not exist" but I'm trying to work out how I can get a list of truly writable tags?

I tried -listw but that produces a massive list so I suspect that is just the list for the application as a whole. Is there a command that will return a list of writable tags for a specific file format or alternatively am I just doing something wrong in this instance?

-L is not returning XPKeywords but is returning Keywords and the write command is just -XPKeywords=tag which works for other file formats (I'm using both via Windows cmd and also via the .NET tool).

Any hints would be great as this seems to apply to other formats as well?

Hayo Baan

For GIF, only XMP and ICC are supported and since XPKeywords is not an XMP tag, it can't be written. Hence the 0 files updated message.
See the table at https://exiftool.org/index.html#supported for what is and what isn't supported.

What do you mean with "-L is not returning XPKeywords"? -L is for setting the character encoding to Windows Latin1...
Hayo Baan – Photography
Web: www.hayobaan.nl

Paul Wittle

Ah, ignore my comment about -L that is a mistake. I just meant it lists -XPKeywords as a blank result.

Am I correct that -listw always returns the full list?

Phil Harvey

-listw returns all writable tags with no regard to what sort of file you are writing.

Your problem here is discussed in FAQ 23.

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

Paul Wittle

Thanks for the replies it is really helpful  :)

Out of interest, I assume there is not a command which returns the Supported File Types table?

I only ask as the writable formats is query-able and if the support file types were then I could build some logic off the back of that. As I think I mentioned; I'm using the .NET connector to do this but at the moment I'm just setting things in every possible location in the hope that Windows might pickup at least one.

I've also submitted a feedback to Microsoft asking if they could start searching XMP:Keywords and EXIF:XPKeywords as standard. I've pointed out that one of the other of those seems to work for all the file types I've tested so far.

Feel free to upvote that feedback if you as want to be able to search for keywords in Windows Explorer for all media types. https://aka.ms/AA5bzcg

Paul Wittle

I notice you can use -listwf which is so close, I'm really after a function -listwf[GIF] which would then return XMP ICC whilst -listwf[JPG] would return EXIF IPTC XMP ICC.

Anyway, that might be a nice to have but loving the tool anyway and thanks for all your hard work developing it :)

Phil Harvey

Quote from: pwit on June 14, 2019, 09:33:18 AM
I notice you can use -listwf which is so close,

I'm glad you found this.

QuoteI'm really after a function -listwf[GIF] which would then return XMP ICC whilst -listwf[JPG] would return EXIF IPTC XMP ICC.

You have no idea how complicated this would be.  The table on the ExifTool home page is actually an over-simplification.  There are many fringe cases ignored by this table where other metadata may exist in a file.  In reality, the actual tags that may be written to a file depend on the details of the specific file, not simply the file type.

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

Phil Harvey

Oh, and...

Quote from: pwit on June 14, 2019, 09:18:02 AM
I've also submitted a feedback to Microsoft asking if they could start searching XMP:Keywords and EXIF:XPKeywords as standard.

I think you mean XMP:Subject (known as dc:subject in XMP circles).  Also, XPKeywords isn't part of the EXIF standard (although it is in this ExifTool group), and also "XPKeywords" is a made-up ExifTool tag name (I have no idea what Microsoft calls it).

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

Paul Wittle

Yeah, I thought you might say that regarding -listwf; oh well.

Thanks anyway.

Paul Wittle

Interesting point re: XPKeyword. I'll be interested to see if Microsoft do reply as if they decide to read XMP:Keywords that would probably be a good result...but I'm not holding out much hope.

Thanks,
Paul

Phil Harvey

Quote from: Paul Wittle on June 17, 2019, 03:01:21 AM
I'll be interested to see if Microsoft do reply as if they decide to read XMP:Keywords [...]

I think you mean XMP:Subject
...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 ($).

mpegleg

#11
There is also an interesting thing I noticed in the the way Microsoft implements their tags. You may already know this, but I was dumbfounded when I deleted a few tags such as XPComment and also comment, only to have another tag's information suddenly appear in the Explorer Comment column, rather than appear blank as I'd expected.

Apparently the Windows Explorer Comments column is designed to show multiple lots of comments, not just XPComment as I had wrongly assumed. So for example, if you give usercomment a value, it will appear in the Comments column in the Explorer window. If you then give XPComment a different value... it won't appear there! Yet if you delete usercomment, good 'ol XPComment shows up there again. Crazy!

I think it's a crazy way that they deal with this. Very confusing for the novice. I think they should just stick to having one and only one type of tag appear in those columns. The same situation also applies to XPSubject, Title, Keywords, etc. with many different types of keyword tags appearing in the Tags column, and a few others that I can't quite remember now. I don't know how well this is documented, but I'd never heard about it before. Nothing worse than deleting some keyword tags, only to then have some other weird tags appear in the same column in place of them.
OS: Windows 11 Pro

Paul Wittle

All news to me!

I thought XMP:Keywords existed and was the location of the array version whilst EXIF:XPKeywords was the string version. That is from my reading of the documentation and playing around. I'm pretty certain that I referenced XMP:Keywords and it wrote them it so I may have made an assumption but I thought XMP:Keywords was a thing.

Anyway, it has been a bit of a disappointing exercise really as whilst your tool works well there is quite a learning curve and the end product seems to be that Windows doesn't support it properly anyway.

We just wanted to be able to search our media directory with Window Explorer search and find all media relating to say, bridges or fields. Unfortunately I only seem to be able to do that for JPG, TIFF and PDF.

Phil Harvey

Hi Paul,

See this post for more information about the metadata displayed by Windows.

XMP:Keywords exists (in two namespaces actually, XMP-pdf:Keywords and XMP-acdsee:Keywords), but isn't commonly used.  You should use XMP:Subject (XMP-dc:Subject) instead.

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

mpegleg

Yes, it's extremely annoying how Microsoft doesn't take the whole issue of Keyword searching seriously. It's certainly not ExifTool's fault, but Microsoft's!

If Microsoft were serious they could easily overhaul Windows's internal search system to make finding files much easier by watching various tags (which should be completely customizable) and make it much more useful for all types of media files and documents. X1 Search does a pretty good job, but is a bit resource intensive and it's not free, but it does search the contents of files. Not sure how well it handles Exif media data. I'll need to re-install it to find that out.

Everything Search is FREE, and is mainly what I use to search for my media files, but it only does a filename search, and doesn't look inside the file's contents. It is however lightening quick, across all drives, including mapped network drives as well. It's much better and quicker than Windows built-in search, but I think you want Content search so it might not be so useful to you, unless your filenames are very descriptive.
OS: Windows 11 Pro