Friday, 22 February 2019

metadata - What is the proper formatting of the Subject Tag in XMP?


My intention is to assign tags to each image based on the content in the image.For example



enter image description here


This image can be be assigned tags Tulips,Flower etc


So can i assign subject like tulips,flower and so on separated by commas.Will the major software's and websites recognize these tags properly.



Answer



The interface for a lot of programs with regards to keywords is to show them as a comma separated string. But the important thing to remember is that they are not stored as such. They are stored as individual, separate items, as in @Romeo Ninov XMP example.


To do this in exiftool, you command would be
exiftool -Subject=Tulips -Subject=Flower FILE
Note that this will overwrite any previously existing keywords.


If you wanted to add new keywords without overwriting previous ones, you would add a + sign before the equal
exiftool -Subject+=Tulips -Subject+=Flower FILE



If you write it as your comma separated list, like this:
exiftool -Subject="Tulips,Flower" FILE
then you are writing a single keyword with the value of "Tulips,Flower".


If you find it easier to write it as a comma separated list, then you can add the -sep option. But you must be careful of stray spaces. For example, using -sep "," if you try to write "Tulips,Flower, Yellow" (note space after the comma before Yellow) then you are writing a keyword of (space)Yellow, not Yellow.


Read exiftool FAQ #17 carefully for details about list type tags.


No comments:

Post a Comment

Why is the front element of a telephoto lens larger than a wide angle lens?

A wide angle lens has a wide angle of view, therefore it would make sense that the front of the lens would also be wide. A telephoto lens ha...