ExifTool Forum

ExifTool => Newbies => Topic started by: Twinnie on January 04, 2018, 07:02:22 PM

Title: Cannot remove XMP tag
Post by: Twinnie on January 04, 2018, 07:02:22 PM
Hello guys,

I'm currently trying to remove a XMP tag in a file. The command exiftool file.jpg -Software -g -a gives the following output:
Quote
---- XMP ----
Software                        : ASDF
Software                        : ASDF

So the software tag is two times in the XMP part of the file. If I have a look with a hex viewer, I can see that this is the <tiff:Software> and the <exif:Software> tag. So I'm using the command exiftool file.jpg -XMP-tiff:Software= to remove it. But the ouptut is always:
Quote
    0 image files updated
    1 image files unchanged

What am I doing wrong?
Title: Re: Cannot remove XMP tag
Post by: StarGeek on January 04, 2018, 07:12:06 PM
Change -g to -g1 to get the exact locations of those tags.
Title: Re: Cannot remove XMP tag
Post by: Twinnie on January 04, 2018, 07:41:15 PM
Quote from: StarGeek on January 04, 2018, 07:12:06 PM
Change -g to -g1 to get the exact locations of those tags.

Thanks for the tip! Here's the output with -g1:
Quote
---- XMP-exif ----
Software                        : ASDF
---- XMP-tiff ----
Software                        : ASDF
It indeed is in the exif and tiff part of XMP.
Title: Re: Cannot remove XMP tag
Post by: StarGeek on January 04, 2018, 08:29:52 PM
What version of exiftool are you using.  It should be able to remove the XMP-tiff:Software tag with the -XMP-tiff:Software= command you used.  If not, then it needs to be looked into.

XMP-exif:Software is not a tag in exiftool's known XMP-exif tags (https://exiftool.org/TagNames/XMP.html#exif).  I think you should be able to remove it with a command like exiftool -XMP-exif:All= -TagsFromFile @ -XMP-exif:All file.jpg but that might also remove some other XMP-exif tags that exiftool doesn't know.  I'd test it on a copy and compare the two with exiftool -g1 -a -XMP-exif:all to see.

To just remove that tag without others, a User-Defined tag would have to be created.