Darktable: Unable to open a number of .NEFs in darktable, rawtherapee but OK in LR and PS

I’m bemused by the failure to open certain Nefs taken in a Nikon D80 about 13 years ago: darktable tells me it cannot open them, asks me to check for image corruption using EXIV2 or EXIFtool and file a bug report on Github if necessary. Rawtherapee has the same issue. Both exhibit the problem under both Win 10 and Linux Mint 20. EXIFtool, under Linux, does not tell me that it finds any issue with these images. XnView MP, under Linux, opens and displays the images OK. FastStone Image viewer under Windows is able to show me the EXIV data without issue. All these NEFs are managed in Lightroom and can be opened, via ACR, in Photoshop CS6.

Now the even more intriguing part: images taken by the same camera a few months later can be opened for raw processing in all applications, in all environments, without issue.

The only difference I can see, using the information in ‘image information’ in darktable’s lighttable, is that the earlier, failing images, have no information for the lens used; the later, problem-free images, show this information.

If the failing NEFs are converted to Dngs then they can be opened without issue by darktable (but the colours look quite wrong compared to the NEF versions, in Lightroom).

Anybody got any ideas of what might be causing the issue, and a way around it?

Can you provide the affected file under permissive license?

1 Like

In principle, yes - but I am too incompetent to know how to/ where to provide them, how any form of licence is attached to them or where this licence is legitimately obtained - advice would be most helpful

Just drag and drop the file(s) into the text area of the new post.
As for the licence, nothing fancy, just a statement saying that you licence that image under whatever permissive licence you choose (folks usually use cc-by one of those)

This site gives several possibilities for a license. But, like @gadolf says, you can just say it in words.

1 Like

@LateJunction Hi, indeed the only way to discover what is going on is if you can provide a NEF that has this issue. I got my D80 in 2009 and at least currently these NEFs open fine for me. So it’s interesting to find out more why yours don’t.

Wasn’t there some problem with corruption if you’d used the Nikon software to transfer files to your computer? Could this be the problem?

Indeed… If so, maybe the corrupted NEF utility can help. But D80 is not in the list?

@paperdigits, you raise a good point, but I’m so old and it has been so many years since I switched to Fuji that I can’t remember. It’s possible that I used some Nikon software to transfer from the camera, but by the time I took these photos I’m pretty certain I was using LR 1.0 (having been a Beta user) and already had a slow, el-cheapo USB SD Card reader (still in use!) which avoided the need for Nikon software. Further more, I seem to remember that I was using PhotoMechanic (early version) to ingest. Either way, I assume that Adobe had to make some modification in LR 1.0 to enable it to read any potentially corrupted NEFs which had been ingested.

But if anybody has a clearer memory about this I would be grateful as it may give a clue as to a work around.

The following image made available under the terms of the CC BY permissive licence.

DSC_2400.nef (5.1 MB)

I trust the ‘drag & drop’ post I made a minute or so ago gives the result people want ?

Looking at your file with a binary editor shows this:

    0000:0140 |                                        4E 49 4B 4F |             NIKO
    0000:0150 | 4E 20 43 4F  52 50 4F 52  41 54 49 4F  4E 00 4E 49 | N CORPORATION.NI
    0000:0160 | 4B 4F 4E 20  44 38 30 00  2C 01 00 00  01 00 00 00 | KON D80.,.......
    0000:0170 | 2C 01 00 00  01 00 00 00  43 61 70 74  75 72 65 20 | ,.......Capture 
    0000:0180 | 4E 58 20 31  2E 33 2E 33  20 57 00 02  32 30 30 38 | NX 1.3.3 W..2008
    0000:0190 | 3A 30 34 3A  32 34 20 31  30 3A 31 32  3A 34 36    | :04:24 10:12:46 

So it’ looks like at least some of those files were transferred with Capture NX and damaged in the transfer. But there are also a lot of mentions of Adobe, and things that look like processing instructions

Perhaps it’s worthwhile to try the utility mentioned bt @kmilos on a copy of the affected files?

Thanks for confirming the use of Capture NX; I tried the utility as suggested; it gives an error because the camera is not on the supported list. But it looks like a very convenient solution, - if it would work on my D80 Nefs!

Would you mind also sharing the dng?

As for the NEF, it doesn’t surprise me that LR and PS can handle this damaged file. Adobe is big enough to devote some of his programmers to help fixing Nikon damaged files caused by Nikon.
On the other way, it doesn’t surprise me that none of the raw editors I tried could open the file (darktable, Rawtherapee, ART, Photoflow, Filmulator, Rawproc, Gimp), for obvious reasons.
What really surprises me is that someone from the FOSS world indeed lost some time fixing the damage, for free, and for a considerable number of cameras (unfortunately, not the model you have).
Just some thoughts to put things in perspective - as I see it.

Agree; I have already been through this thought process my self - the Adobe action is the only explanation for LR and PS (directly or through LR) being able to open the file. the associated dng should be attached ,

The following image is made available under the terms of the CC BY permissive licence.DSC_2400.dng (2.0 MB)

1 Like

Thanks.
It feels like I’m editing a jpeg. The sky is greyish, the size is around 6 mega pixels (but the camera model is 10).
So, I would seek to convert to something as close to raw as possible, so you can get most information.
It seems you have used adobe dng converter, right?
I would open the nef in PS and try to export it as tiff, 16 bit color depth, a big color space (adobr rgb, linear rec 2020, not sRGB!), but I’m not an expert on this, maybe others can help.

Anyway, here’s what I get from a quick edit:


DSC_2400.dng.xmp (10.5 KB)
(darktable 3.2.1)

DSC_2400.dng is an already demosaiced file, not really raw…

Does this indicate it has also suffered some tone mapping?

image

No idea!

Thanks for this; better than my attempts in 3.2.1 because you clearly have more ‘darktable-hours’ than I. Yeah, I agree about the sky - it looks very much like a sub-compact point-and-shoot jpeg! I’m going to examine your history stack in detail.

Yes, your suggestion on exporting a tiff from a PS s what I had decide to do, not being all that impressed with what I could get from the dng. And, yes, I did use the latest version of the dng converter .