Take a heic file and copy it so
1.heic and 2.heic are the same files.
Now execute exiftool "-AllDates=2022:10:13 01:01:01" 1.heic
Then remove all tags ./exiftool -all:all= 1.heic 2.heic
Exec ll 1.heic 2.heic
Files differ now
-rw-r--r-- 1 pi users 1069866 13. Okt 16:47 1.heic
-rw-r--r-- 1 pi users 1069795 13. Okt 16:47 2.heic
This shouldn't happen because when removing all tags all tags should be removed and files should be identical. At least that's what I expect.
I've also noticed that original file size is 1077249 bytes. After changing the date file size gets 1073675 Bytes, so 3,574 Bytes difference, which is quite a lot. I've also tried with -U -u option, but still file size changed. I would have expected that changing the date only changes the date field but leaves the rest as it was. I took a look at https://exiftool.org/exiftool_pod.html but didn't find any other suitable options. Is there one?
Quote from: Predictability on October 13, 2022, 11:04:34 AMI've also noticed that original file size is 1077249 bytes. After changing the date file size gets 1073675 Bytes, so 3,574 Bytes difference, which is quite a lot.
I can't answer the first part, but this is FAQ #13a (https://exiftool.org/faq.html#Q13).
First, I don't know if you really want to do -alldates=XXX because that will add XMP tags to an HEIC file. Perhaps -exif:alldates=XXX is what you want. If you had done this, then likely the two files you compared would be the same.
To maintain object associativity, ExifTool doesn't delete entries from the HEIC ItemInformation table. Generally for HEIC files, the ItemInformation table already contains an EXIF entry (so this wouldn't need to be created when writing EXIF), but often doesn't contain an XMP entry. So when XMP is added, a new entry may be created in the ItemInformation table. When the XMP is deleted, this entry remains (the XMP metadata itself is deleted, and the ItemInformation entry references zero-length data). The size difference you notice is this empty entry in the ItemInformation table.
- Phil
Thank you both very much for the fast and very helpful answers.
QuotePerhaps -exif:alldates=XXX is what you want. If you had done this, then likely the two files you compared would be the same.
Yes that works now as expected. So when using exiftool "-exif:alldates=2022:10:13 01:01:01" 1.heic and then ./exiftool -all:all= 1.heic 2.heic both files are identical.
So then there is a new question: Why doesn't remove ./exiftool -all:all= the previously added XMP Tags? I thought this is the correct way to remove all Tags. Can you give me the command for really removing all tags?
When using htmlDump like in the FAQ #13a suggests
and with one file first using "-exif:alldates=" for one file and "-AllDates=" for the other file and then removing all tags with -all:all both files show "No EXIF or TIFF information found in image". But still they are different, because of the XMP Tag that was added as you wrote above. So why isn't that tag shown if it is obviously not removed?
Quote from: Predictability on October 14, 2022, 03:35:38 AMWhy doesn't remove ./exiftool -all:all= the previously added XMP Tags?
As I tried to explain above, it
does remove all XMP tags, just not the container that carried the XMP.
- Phil
Ok, now I understand. Is there an option to remove the container (again)? Didn't see a suitable option.
Quote from: Phil Harvey on October 13, 2022, 11:55:43 AMTo maintain object associativity, ExifTool doesn't delete entries from the HEIC ItemInformation table.