Main Menu

Deleting Structures

Started by Piz Bernina, September 04, 2021, 04:42:34 PM

Previous topic - Next topic

Piz Bernina

Hi folks,

is there a way to delete a structure by only specifying a field name without the
value (e.g. using a placeholder for the value)?

I mean something like this (but it doesn't work):
exiftool -RegionExtensions-="{XMP-iptcExt:LocationShownSublocation=*}" test.xmp
The goal of this example is to remove all RegionExtension structures that contain a LocationShownSublocation field.

Any suggestions?

StarGeek

Are you talking about the MWG RegionExtensions?  If so, probably not.  Otherwise, Phil will have to respond and he's away for a couple of weeks.  You can hit the Notify button in the upper right corner of this thread to get a notification when there is a response.
* 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).

Piz Bernina

@StarGeek: Thanks for your quick reply.

Yeah, I'm talking about MWG RegionExtensions. Why do you think, it's not possible to manipulate MWG RegionExtensions with placeholders (or something alike) but it may be possible with other kinds of structs?

StarGeek

Structures are very complicated to begin with and adding an arbitrary structure as would be done with the RegionExtensions increases that tremendously.  As it says in that link, RegionExtensions can only be written as full structures.

Though, giving it some further thought, it probably would be possible to do with user defined tag.  Internally, structures are Perl hashes and I would think that traversing the hash elements looking for the one you want to delete might be possible.  But that would be more of a hard coded solution.

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