Hi Phil,
I have a problem extracting some binary data, e.g. DustRemovalData from Canon files. Using
exiftool -json -a -e -G1:4 -n -s -struct CanonEOS500D.jpg
the output contains
"Canon:DustRemovalData": "(Binary data 1024 bytes, use -b option to extract)"
But, if I add the -b option to the command, the output does not contain this tag at all. While trying to understand the reason for this, I found the code starting at line 2135 in exiftool (version 10.87) seems to cause this:
if (defined $binaryOutput and not $binaryOutput and $$et{TAG_INFO}{$tag}{Protected}) {
Is this the expected behavior, or is it a bug? If it is expected, how can I identify the tags which will be suppressed?
Thanks,
Volker
Hi Volker,
Very good sleuthing!
In general, this is done to prevent large binary data blocks from being copied unless they are specified explicitly. I can't recall now why this was done for the -X, -j and -php options, but it was certainly intentional.
This will affect any tag with the "Binary" and "Unsafe" flags set in the -listx -f output. Unsafe tags are denoted in the tag name documentation with a "!" after their writable type.
- Phil
Hi Phil,
Thanks for the quick answer. It only affects 37 tags, and they don't seem important for us.
Volker