ExifTool Forum

ExifTool => The "exiftool" Application => Topic started by: philbond87 on October 16, 2020, 10:00:23 AM

Title: Erasing tag values – Are some tags related?
Post by: philbond87 on October 16, 2020, 10:00:23 AM
I have written an application that displays the EXIF, IPTC and XMP tags that contain values in a directory of images. I can select the tags that I want to clear from all of the images (that have those tags).
The application takes the "selected" tags and forms a string, tagsToClear, which is string variable that is a part of this Exiftool command:
usr/local/bin/exiftool -m -progress: -r -overwrite_original_in_place " + tagsToClear + " " + targetFolder.ShellPath

The tagsToClear string might look like this, for example:
" -EXIF:Artist= -IPTC:By-line= -XMP:CreatorPostalCode "

(I realize that some tags are not writeable.)

The question I have is this:
Are some tags somehow interdependent?
I find that if I try to clear certain IPTC tags they do in fact go away. However if I then clear certain XMP tags some IPTC tags are generated (that seem to be related to the XMP tags that were cleared).

Thank you community
Title: Re: Erasing tag values – Are some tags related?
Post by: StarGeek on October 16, 2020, 11:12:20 AM
There are some EXIF tags which can be mandatory (see 3rd paragraph on the EXIF tags page (https://exiftool.org/TagNames/EXIF.html)) and a few others that can be automatically created when using MWG tags (https://exiftool.org/TagNames/MWG.html) but otherwise, no, removing a tag in one group doesn't create a tag in another group.

Are you sure that those other tags don't already exist (see 3rd paragraph under FAQ #3 (https://exiftool.org/faq.html#Q3))?  For example, clearing XMP:Headline or XMP:City can reveal the same name duplicate in IPTC when the -a (-duplicates) option (https://exiftool.org/exiftool_pod.html#a---a--duplicates---duplicates) is not used.

Can you give a example command where this is happening?
Title: Re: Erasing tag values – Are some tags related?
Post by: Phil Harvey on October 16, 2020, 12:59:25 PM
Quote from: philbond87 on October 16, 2020, 10:00:23 AM
if I then clear certain XMP tags some IPTC tags are generated (that seem to be related to the XMP tags that were cleared).

Yes, definitely FAQ 3 as StarGeek mentioned.

- Phil
Title: Re: Erasing tag values – Are some tags related?
Post by: philbond87 on October 16, 2020, 10:51:41 PM
QuoteAre you sure that those other tags don't already exist (see 3rd paragraph under FAQ #3)?  For example, clearing XMP:Headline or XMP:City can reveal the same name duplicate in IPTC when the -a (-duplicates) option is not used.
QuoteYes, definitely FAQ 3 as StarGeek mentioned.

Yes, that was it. Thank you!