Windows 10 professional x64, 20H2
Command line : exiftool -m -all= -tagsfromfile @ -all:all -unsafe -icc_profile filename.dng
version : exiftool-12.16
Output from tool
Warning: SubIFD BitsPerSample should have 3 values - C:/Users/pierr/Pictures/2021-01-29St-Laurent/20210129_163226.dng
Error: Error reading image data - C:/Users/pierr/Pictures/2021-01-29St-Laurent/20210129_163226.dng
0 image files updated
1 files weren't updated due to errors
ExifTool won't rewrite a file if the image data is compromised. This file is corrupted somehow.
I can't say more without seeing a sample. You can send it to me if you want (philharvey66 at gmail.com).
- Phil
I got the sample:
> exiftool ~/Desktop/SamsungGalaxyS20_5G.dng -validate -warning -a
Validate : 3 Warnings
Warning : SubIFD BitsPerSample should have 3 values
Warning : Undersized SubIFD StripByteCounts (230400 bytes, but expected 345600)
Warning : SubIFD:StripOffsets+StripByteCounts runs past end of file
It is that last Warning that is the real problem. It looks like the file has been truncated, with about 100 kB missing somehow. Only 115200 bytes of the strips exist.
Does this happen for original DNG files from this phone? Or have they been modified by some other software?
- Phil
The sample is a copy of the file straight out of the phone.
I will resend it from the phone.
Sent
Exact same problem with this one. Must be a phone software bug.
- Phil
I want to edit standard exif fields: camera model and make.
Shouldn't exiftool-m option allow to ignore the non-conformity, i.e. allow updating fields while keeping the rest of the file untouched ?
I am hoping to do this in batch using a command such as:
exiftool -m -Make="Apple" -Model="iPhone 8 Plus" -o %d%f_spoof.%e FILE ...
-m only downgrades minor errors. Any error involving potential loss of image data is not minor. ExifTool can not be used to edit a file like this. Your only recourse (other than getting Samsung to fix this bug, which may happen eventually with a software update) is to find some software that will read these files and write an output file without this problem.
- Phil
I found that Adobe DNG converter can process this file without problem. The result can be tweaked using Exiftool.
Going back to the Samsung dng file, couldn't you make Exiftool ignore this error, and allow change exif fields that are correctly identified.
The original dng image is not corrupted: it can be read by at least two photo editors, and the DNG converter.
Thanks for your help.
The original DNG was not written correctly. Either the strip byte counts are wrong or the strip data is truncated. Without processing the image, you can't tell which. ExifTool does not process image data, so the only safe thing to do is to refuse to write these files. Otherwise ExifTool could potentially further damage the image.
- Phil
How about a more permissive option for letting through more severe errors?
For example an option -mSevere. The risk will be fully understood by the user, if that is really what the user wants.
-- Pierre
Sorry, but I'm standing firm on this one.
- Phil