Forgotten how to delete IPTC Keywords tag

Started by Joanna Carter, August 08, 2021, 01:32:39 PM

Previous topic - Next topic

Joanna Carter

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?

StarGeek

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
* 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).

Joanna Carter

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?

Phil Harvey

Is this standard IPTC?  Run this command to see:

exiftool -validate -warning -a FILE

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

Joanna Carter

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.

Joanna Carter

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?

Phil Harvey

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

StarGeek

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.  I've had oddball files before and usually that command would fix it.  As long as it's not a RAW file, of course.
* 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).

Joanna Carter

Thank you StarGeek.

That command worked a treat.

Phil, I'm sending you the file anyway, just in case it confirms your thoughts.

Phil Harvey

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