[REQUEST] A single flag to skip any tag that contains binary data

Started by ShadowCat8, March 16, 2021, 07:55:23 PM

Previous topic - Next topic

ShadowCat8

Greetings Phil,

I am requesting a single flag to skip and/or silently ignore any tag that would produce the ubiquitous "(Binary data xxxxx bytes, use -b option to extract)".

I am writing a utility to check and either validate or update (READ: replace) the metadata that was extracted by another utility and written into a text file.  The problem I am finding is that the other utility did not gracefully handle the binary data like exiftool does and wrote the binary data directly to the file as well.  This has created some issues with the programmatic parsing of the metadata files due to the binary data being seen as "unknown encoding".

And, I know that exiftool does gracefully handle the tags that contain binary data, but the entire purpose of having a separate metadata text file is for it to be human-readable.  If I can't just show the value for the tag within the text file, I would rather just skip it.  And, yes, I know I can exclude specific tags with "-x", but for the size of the command I am getting so far, it would seem to make sense to just have one flag that would just ignore them all...  For example:

exiftool -m -x DataDump -x ThumbnailImage -x PreviewImage -x PreviewPICT -x PhotoshopThumbnail -x DustRemovalData -x RedToneReproductionCurve -x GreenToneReproductionCurve -x BlueToneReproductionCurve -x TileOffsets -x TileByteCounts -x JPEGTables -x StripOffsets -x StripByteCounts -x PhotoshopBGRThumbnail -x GrayToneReproductionCurve -x Padding -x AToB0 ${thisfile}

And, that is just what I have found so far from the sample media repository I am using while I code this utility.

So, can this be put on the roadmap?

TIA.

ShadowCat8
"I do not feel obliged to believe that the same God who has endowed us with sense, reason, and intellect has intended us to forgo their use." -- Galileo Galilei

StarGeek

If your utility can use an .exiftool_config file, you could make a shortcut to cover all of the tags you want to exclude.

You could also exclude any preview type tags by excluding Preview:All.
* 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).

Phil Harvey

I may be able to implement this by overloading an existing option.  Maybe --b.  I'll think about this.

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

Phil Harvey

I've added the --b option to ExifTool 12.22 (just released).

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

ShadowCat8

Thank you very much, Phil!

Most appreciated!

Regards,
ShadowCat8
"I do not feel obliged to believe that the same God who has endowed us with sense, reason, and intellect has intended us to forgo their use." -- Galileo Galilei