MWG:Keywords in *.PNG files

Started by jbionic, January 20, 2023, 02:57:43 AM

Previous topic - Next topic

jbionic

Hi there,

I've got a bunch of PNG files metatagged by MWG:DateTimeOriginal.
The program I use automatically populates the MWG:Keywords from the IPTC:Keywords, however it does so only as far as JPG files are concerned. For *.PNG files the MWG:Keywords tag is missing.
So somehow *.PNG files got the MWG:DateTimeOriginal, but don't seem to have the MWG:Keywords, which
makes me wonder if this has been designed this way on purpose for *.PNG, or should I blame anything else?

Best regards.   

StarGeek

From the MWG tags page
     IPTC information is written only if the original file contained IPTC.

IPTC tags in a PNG file is non-standard and you will get this warning
Warning: [minor] Creating non-standard IPTC in PNG
So unless you previously created IPTC tags in the file, IPTC:Keywords won't be written.  You can force them to be written by also adding something like -IPTC:codedCharacterSet=utf8 or -IPTC:EnvelopeRecordVersionl=4.  The latter tag will be automatically written anyway when you create an IPTC group.

The XMP:Subject tag should be created in a PNG when you use MWG:Keywords.
* Did you read FAQ #3 and use the command listed there?
* Please use the Code button for exiftool code/output.
 
* Please include your OS, Exiftool version, and type of file you're processing (MP4, JPG, etc).

jbionic

Hi StarGeek, Thanks for the info. Perhaps I should explain in better terms the reason I've raised the question, so hopefully you can advise.

My collection of images ain't vast, roughly about 9000 in total. Mainly I have 3 file types present: JPG (95% of total), PNG (4-5%) and a few dozens animation MP4 and GIF files.

The tag base only includes IPTC:Keywords, MWG:DateTimeOriginal and MWG:Keywords  (see below screenshot 111)


Historically I've been using the IPTC:Keywords for manual inputs, while the program I use populates the MWG:Keywords automatically without my involvement. However it does so only for JPG files (see below screenshot 333)


For PNG files the MWG:Keywords always stays empty (see below screenshot 222)


For animation files things work a little differently because they don't accept the IPTC:Keywords, so I have to manually input my data into MWG:Keywords, while IPTC:Keywords stays empty (see below screenshot 444)


Now back to my question. The most important aspect of image meta-tagging is how the data are gonna be fetched later when I start running my queries. The problem is that at this moment I can run any query against the IPTC:Keywords and retrieve the results in both JPG and PNG. However for animation files I need to run a separate query against the data kept in the MWG:Keywords. While the issue ain't pressing due to the little size of my animation file base, ideally I'd love to be able to retrieve JPG, PNG and animation files with one query without having to run a separate. So I wonder if there is any way for me to do that.

Thanks.                     

StarGeek

GIF and MP4/Mov files can't hold IPTC data.  There's no way around that.

But they can both hold XMP data.  XMP:Subject is the tag in XMP that correlates to IPTC:Keywords.

I can't speak as to what your program reads or how flexible it is, but if you can switch to XMP:Subject, then that tag works for all your example file types.
* Did you read FAQ #3 and use the command listed there?
* Please use the Code button for exiftool code/output.
 
* Please include your OS, Exiftool version, and type of file you're processing (MP4, JPG, etc).