ExifTool Forum

General => Metadata => Topic started by: Zetorg on November 21, 2022, 01:11:13 PM

Title: exiftool 12.50 issues with macOS screenshot metadata
Post by: Zetorg on November 21, 2022, 01:11:13 PM
Version from brew.sh: exiftool--12.50.arm64_ventura.bottle.tar.gz

Sample file:
https://mega.nz/file/ZUlVGbIL#InJWtY5J--scnHYu23T-pfKRHF4SNx0fdLDFwGAIFyA

It's macOS 13.0.1 screenshot. These are the 3 issues found:
1) When displaying the metadata with -b I get 5 beeps at bash terminal:
exiftool macOS-scr-exiftool.png

After removing all of its data with
exiftool -all= macOS-scr-exiftool.png
2) there's still metadata remaining:
Apple Data Offsets              : (Binary data 28 bytes, use -b option to extract)
but now doesn't make any beep with -b.

3) Also, in both cases with -b, it does not output a newline at the end of the command, so the bash prompt is in the same line after the metadata which shouldn't happen.

The hash of the uploaded file with all metadata is as follows:
$ shasum macOS-scr-exiftool.png
0072b7e3c679658be16f9f7b6d57deb2c04cbeac  macOS-scr-exiftool.png
Title: Re: exiftool 12.50 issues with macOS screenshot metadata
Post by: StarGeek on November 22, 2022, 03:13:23 PM
Quote from: Zetorg on November 21, 2022, 01:11:13 PM1) When displaying the metadata with -b I get 5 beeps at bash terminal:

I'm not sure what you expect when you're displaying raw binary data.  Binary data is not human readable and every byte, even non-printable characters, is going to be displayed.  This includes 0x07 characters which is the bell character (https://en.wiktionary.org/wiki/bell_character).

You only want to use the -b (-binary) option (https://exiftool.org/exiftool_pod.html#b---b--binary---binary) when you are extracting the binary data to a separate file.

QuoteAfter removing all of its data with
exiftool -all= macOS-scr-exiftool.png
2) there's still metadata remaining:
Apple Data Offsets              : (Binary data 28 bytes, use -b option to extract)

AppleDataOffsets is listed as not writable (see the PNG tag page (https://exiftool.org/TagNames/PNG.html)), so maybe there's a reason it can be removed. Phil will have to comment on this.

Quote3) Also, in both cases with -b, it does not output a newline at the end of the command, so the bash prompt is in the same line after the metadata which shouldn't happen.

Because adding a character to binary output would corrupt the binary data.  And appending multiple binary tags to each other renders the data useless because there's no way to separate them.  You can't parse them by using new lines, because the new line is a legitimate character in binary and not a printed new line.
Title: Re: exiftool 12.50 issues with macOS screenshot metadata
Post by: Phil Harvey on November 25, 2022, 08:16:03 AM
This tag isn't writable because it would be difficult for the user to do anything sensible other than delete it, and I don't know what the effect of that would be.  The information it contains is more concerned with the image data, and not metadata per se.

- Phil