[NB] Error Writing Metadata to All Samsung Phone DNG's

Started by thegpfury, February 04, 2023, 03:20:24 AM

Previous topic - Next topic

thegpfury

Just purchased Imatch 2021 planning on replacing Lightroom with this for organizational purposes. Love it so far (although I just saw the 2023 sneak peek forum, whoops).

Anyway, I'm seeing a repeatable error with all DNG's that I have taken with my Samsung S21 Ultra and S22 Ultra phones. Anytime I try to save metadata it fails with an "error writing metadata error".

Writing to the JPG files that are created at the same time works fine.

Mario

#1
Please upload a sample DNG file which exhibits this problem and post as link so we can check it.
Or send it to support email address, with a link back to this post (I get tons of emails every day).

IMatch displays the full warning / error reported by ExifTool in the ExifTool Panel and logs it to the log file.
The yellow warning icon you see in the File Window for each failed file reveals the error message when you hover the mouse cursor over it. Knowing this error message would be helpful.

My first guess is that Samsung "invented" something new for these particular DNG files and that ExifTool does not like or support it. DNG is not really a standard anymore, and phone and certain software vendors "enhance" the DNG with their own flavor of storage schemes to gain some advantage or better user retention.

Please note that my "My metadata does not work" queue is always full and that it can take a week or two before I can look into yet another obscure metadata problem. Usually it's not IMatch or ExifTool causing the problem :(
-- Mario
IMatch Developer
Forum Administrator
http://www.photools.com  -  Contact & Support - Follow me on 𝕏 - Like photools.com on Facebook

thegpfury

Ok just sent that over.

I'm sure it's Samsung being stupid with file formats. I tested a few other tools, and most of them straight up won't work with the files in general.

Mario

#3
Hi,

I have analyzed the DNG file you have sent.
It reports "S908USQS2AVI1" in the software tag (Samsung?) and reports that metadata was written using "Adobe Photoshop Lightroom Classic 12.1 (Windows)"

The IMatch Metadata Analyst reports the following problem with the file:

SubIFD BitsPerSample should have 3 values
Undersized SubIFD StripByteCounts (230400 bytes, but expected 345600)
SubIFD:StripOffsets+StripByteCounts runs past end of file

and this appears to be serious. It seems some offsets (pointers to locations in the file) are corrupted and even point at locations "outside" the file.

ExifTool aborts the write process for safety reasons and reports:
Error: Error reading image data - E:/data/download/community/12996/R_AAA20221018_185541.dng

In short: The file structure is broken.

When I open the File in Photoshop / ACR and save it as a DNG, ExifTool reports no problems for the copy and writes to it without problems. I suggest you do the same, to repair the damage in your files.

I maybe ask Phil from ExifTool about this. Do I have your permission to provide the file you've sent to Phil for analysis if he requests it?
-- Mario
IMatch Developer
Forum Administrator
http://www.photools.com  -  Contact & Support - Follow me on 𝕏 - Like photools.com on Facebook

thegpfury

Yeah, you can share it with him.

That's odd that it shows as corrupted. Photos straight off the phone give the same error.

Mario

I cannot say anything about photos straight from the camera since you did not sent me one.
If the photos produced by the camera show this error, your camera has a firmware problem. The metadata it writes contains pointers to data outside the image, which is an error.

ExifTool refuses to write to files it considers faulty for safety reasons.
Please send me a DNG file straight from the camera. We have to rule out that Lr/ACR create or add to the problem.
Lr does not do much with metadata (except Adobe's core XMP set) and may just ignore the error since it does not look for maker notes or other data stored in the preview / thumbnail / other SubIFDs.

Saving the DNG as a new DNG in ACR fixes the problems since the SubIFD blocks (thumbnail, preview, ...) are written from scratch, and right this time.

Another indicator that your phone writes corrupted IFDs.
Hopefully Samsung cares enough to fix the firmware. I suggest you contact them (if you can reach them) and tell them about the problem.
Or maybe it's the default Android Google camera they use? Samsung often writes their own stuff instead of using the Android standards, so both may be the case.

But this is nothing I can fix in IMatch.
I think that ExifTool is doing the right thing. Reporting the corrupted / invalid file structure and refusing to write to the file.
-- Mario
IMatch Developer
Forum Administrator
http://www.photools.com  -  Contact & Support - Follow me on 𝕏 - Like photools.com on Facebook