ExifTool Forum

ExifTool => Developers => Topic started by: Joanna Carter on August 08, 2021, 01:32:39 PM

Title: Forgotten how to delete IPTC Keywords tag
Post by: Joanna Carter on August 08, 2021, 01:32:39 PM
I have a jpeg file which shows [IPTC] Keywords as having a value that I now cannot get rid of.

Can anyone drop me a hint as to how to best get rid of it?
Title: Re: Forgotten how to delete IPTC Keywords tag
Post by: StarGeek on August 08, 2021, 01:55:56 PM
Do you mean you want to delete a single problematic keyword or remove the whole keywords tag?

To remove an individual keyword, you would use
exiftool -keywords-="Keyword to remove" file.jpg

To remove them all
exiftool -keywords file.jpg
Title: Re: Forgotten how to delete IPTC Keywords tag
Post by: Joanna Carter on August 19, 2021, 12:35:09 PM
I need to revive this topic.

I am using -mwg:keywords=Something to write to a jpeg file, but when I write -mwg:keywords= to clear it down, xmp-dc:subject gets cleared but iptc:keywords is left with the old value.

I've tried -keywords= and -iptc:keywords= but both return


    0 image files updated
    1 image files unchanged


In fact, writing anything more to either mwg:keywords or xmp-dc:subject doesn't change what is stored in iptc:keywords

Any ideas?
Title: Re: Forgotten how to delete IPTC Keywords tag
Post by: Phil Harvey on August 19, 2021, 12:37:46 PM
Is this standard IPTC?  Run this command to see:

exiftool -validate -warning -a FILE

- Phil
Title: Re: Forgotten how to delete IPTC Keywords tag
Post by: Joanna Carter on August 19, 2021, 12:43:57 PM
Thanks. That gives me:


Validate                        : 8 Warnings (5 minor)
Warning                         : [minor] Non-standard IPTC at JPEG-APP1-IFD0-IPTC
Warning                         : Missing required JPEG ExifIFD tag 0x9000 ExifVersion
Warning                         : Missing required JPEG ExifIFD tag 0x9101 ComponentsConfiguration
Warning                         : Missing required JPEG ExifIFD tag 0xa000 FlashpixVersion
Warning                         : [minor] IFD0 tag 0x0106 PhotometricInterpretation is not allowed in JPEG
Warning                         : [minor] Missing required JPEG IFD0 tag 0x011a XResolution
Warning                         : [minor] Missing required JPEG IFD0 tag 0x011b YResolution
Warning                         : [minor] Missing required JPEG IFD0 tag 0x0213 YCbCrPositioning


Can I do anything to fix it, or is to just a rogue file? I picked it up off the internet a couple of years ago.
Title: Re: Forgotten how to delete IPTC Keywords tag
Post by: Joanna Carter on August 19, 2021, 12:51:56 PM
Hi Phil

Don't worry. I've opened the file in an editor and exported it to the same file type and that cleared it.

It was just getting me wondering because if happens to be one of my goto images for testing my app. Is there anything that can be done from ExifTool if a user tries to work with such a file and calls my support line?
Title: Re: Forgotten how to delete IPTC Keywords tag
Post by: Phil Harvey on August 19, 2021, 03:56:17 PM
Non-standard IPTC is not that uncommon at this location, but I don't know what software other than ExifTool will read it from there. 

However, ExifTool should update the IPTC there when writing IPTC:Keywords.  Could you post the file or send it to me so I can see what is happening?

- Phil
Title: Re: Forgotten how to delete IPTC Keywords tag
Post by: StarGeek on August 19, 2021, 04:09:09 PM
Quote from: Joanna Carter on August 19, 2021, 12:51:56 PMIs there anything that can be done from ExifTool if a user tries to work with such a file and calls my support line?

Did you try the command in FAQ #20 (https://exiftool.org/faq.html#Q20).  I've had oddball files before and usually that command would fix it.  As long as it's not a RAW file, of course.
Title: Re: Forgotten how to delete IPTC Keywords tag
Post by: Joanna Carter on August 20, 2021, 04:32:38 AM
Thank you StarGeek.

That command worked a treat.

Phil, I'm sending you the file anyway, just in case it confirms your thoughts.
Title: Re: Forgotten how to delete IPTC Keywords tag
Post by: Phil Harvey on August 20, 2021, 06:47:59 AM
The file you posted doesn't have the non-standard IPTC:

> exiftool ~/Desktop/Asterix\ et\ Obelix.jpg -keywords -subject -validate -warning -a -G5
[JPEG-APP13-Photoshop-IPTC] Keywords            : Nounours, Didier
[JPEG-APP1-XMP] Subject                         : Nounours, Didier
[ExifTool]      Validate                        : 7 Warnings (4 minor)
[ExifTool]      Warning                         : Missing required JPEG ExifIFD tag 0x9000 ExifVersion
[ExifTool]      Warning                         : Missing required JPEG ExifIFD tag 0x9101 ComponentsConfiguration
[ExifTool]      Warning                         : Missing required JPEG ExifIFD tag 0xa000 FlashpixVersion
[ExifTool]      Warning                         : [minor] IFD0 tag 0x0106 PhotometricInterpretation is not allowed in JPEG
[ExifTool]      Warning                         : [minor] Missing required JPEG IFD0 tag 0x011a XResolution
[ExifTool]      Warning                         : [minor] Missing required JPEG IFD0 tag 0x011b YResolution
[ExifTool]      Warning                         : [minor] Missing required JPEG IFD0 tag 0x0213 YCbCrPositioning


- Phil