ExifTool Forum

ExifTool => Newbies => Topic started by: bwanaRSA on October 19, 2022, 10:23:21 AM

Title: How do I remove the Caption field?
Post by: bwanaRSA on October 19, 2022, 10:23:21 AM
I'm using On1 Photo raw and when I export it gives me a "caption" field that is causing me no end of problems. How do I remove it?

I can remove Caption-Abstract using
exiftool -iptc:Caption-Abstract= but that's not the right field. I need to keep that one.
Title: Re: How do I remove the Caption field?
Post by: Phil Harvey on October 19, 2022, 10:42:22 AM
See FAQ 3 (https://exiftool.org/faq.html#Q3) to determine the tag name and where it is stored, then consult the Tag Name documentation (https://exiftool.org/TagNames/index.html) to see if this tag is writable.

- Phil
Title: Re: How do I remove the Caption field?
Post by: bwanaRSA on October 19, 2022, 11:37:12 AM
Thanks Phil.

It says "string/" - does that mean I'm stuck with it?
Title: Re: How do I remove the Caption field?
Post by: StarGeek on October 19, 2022, 11:54:29 AM
What is the output of the command from FAQ 3?  "string/" shouldn't be the name and group of a tag.  You should see something like
[XMP-dc]        Description                     : This is a description
Title: Re: How do I remove the Caption field?
Post by: bwanaRSA on October 19, 2022, 12:09:38 PM
Thanks StarGeek. When I do a exiftool -s for the image I find the description "Caption" under XMPToolkit                      : XMP Core 5.6.0
Title: Re: How do I remove the Caption field?
Post by: Phil Harvey on October 19, 2022, 01:07:52 PM
The "string/" in the Writable column of the tag name documentation means that it is writable as a string but avoided by default so you need to specify the full group name that you see with the -G1 option when extracting.  I think this is the XMP-acdsee group because that's the only Caption I can see in XMP.  So the command to remove this will be:

exiftool -xmp-acdsee:caption= FILE

- Phil
Title: Re: How do I remove the Caption field?
Post by: bwanaRSA on October 19, 2022, 01:26:28 PM
Thanks Phil

When I run with the -G1 option I see:

[XMP-iptcCore]  Caption                         :
Title: Re: How do I remove the Caption field?
Post by: Phil Harvey on October 19, 2022, 03:34:09 PM
That is unfortunate.  Whatever software wrote that tag is in error because this tag is not part of the IPTC-for-XMP specification.

You will need to create a user-defined tag to be able to write this.  The attached config file will do it for you, and allow you to delete the Caption tag with this command:

exiftool -config caption.config -caption= FILE

- Phil
Title: Re: How do I remove the Caption field?
Post by: bwanaRSA on October 19, 2022, 04:02:44 PM
Thank you so much for your help Phil!

I see there are numerous posts on creating automator actions to deal with this so that's what I'll do next.
Title: Re: How do I remove the Caption field?
Post by: StarGeek on October 19, 2022, 04:41:37 PM
Alternatively, the XMP can be removed and recopied.  The result is that XMP-iptcCore:Caption is removed and the contents copied to XMP-acdsee:Caption, which can be edited normally.

C:\>exiftool -G1 -a -s -xmp:all y:\!temp\Test4.jpg
[XMP-x]         XMPToolkit                      : Image::ExifTool 12.49
[XMP-iptcCore]  Caption                         : Badly created xmp
[XMP-dc]        Description                     : This is a description
[XMP-dc]        Title                           : Test4

C:\>exiftool -P -overwrite_original -xmp:all= -TagsFromFile @ -xmp:all y:\!temp\Test4.jpg
    1 image files updated

C:\>exiftool -G1 -a -s -xmp:all y:\!temp\Test4.jpg
[XMP-x]         XMPToolkit                      : Image::ExifTool 12.49
[XMP-acdsee]    Caption                         : Badly created xmp
[XMP-dc]        Description                     : This is a description
[XMP-dc]        Title                           : Test4
Title: Re: How do I remove the Caption field?
Post by: Phil Harvey on October 19, 2022, 04:44:38 PM
Good point.  That is a quick way to remove all non-standard XMP.

- Phil