ExifTool Forum

ExifTool => Bug Reports / Feature Requests => Topic started by: ShadowCat8 on March 16, 2021, 07:55:23 PM

Title: [REQUEST] A single flag to skip any tag that contains binary data
Post by: ShadowCat8 on March 16, 2021, 07:55:23 PM
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
Title: Re: [REQUEST] A single flag to skip any tag that contains binary data
Post by: StarGeek on March 16, 2021, 08:23:07 PM
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.
Title: Re: [REQUEST] A single flag to skip any tag that contains binary data
Post by: Phil Harvey on March 16, 2021, 10:12:56 PM
I may be able to implement this by overloading an existing option.  Maybe --b.  I'll think about this.

- Phil
Title: Re: [REQUEST] A single flag to skip any tag that contains binary data
Post by: Phil Harvey on March 17, 2021, 10:21:22 AM
I've added the --b option to ExifTool 12.22 (just released).

- Phil
Title: Re: [REQUEST] A single flag to skip any tag that contains binary data
Post by: ShadowCat8 on March 17, 2021, 03:12:25 PM
Thank you very much, Phil!

Most appreciated!

Regards,
ShadowCat8