darktable icon indicating copy to clipboard operation
darktable copied to clipboard

Nikon Z5 II Raw images show up black (incorrect white / black point values)

Open JimKillock opened this issue 1 month ago • 3 comments

Is there an existing issue for this?

  • [x] I checked and did not find my issue in the already reported ones

Describe the bug

With a Nikon Z5 II camera, with the RAW images set to NEF Lossless compressed, by default, black level 1, 2, 3, 4 are set to 0 and white point is also 0. This renders the image as a black box.

Clicking on the values pulls out the correct values, being Black level 1-4 as 1008, 1008, 1008, 1008; and White point 15892

Steps to reproduce

  1. Import Z5 II NEF Lossless compressed image
  2. Open image in darkroom
  3. Image renders as black

Expected behavior

Darkstable should show a visible image with the correct black levels and whitepoint

Logfile | Screenshot | Screencast

No response

Commit

No response

Where did you obtain darktable from?

darktable.org / GitHub release

darktable version

5.2.1

What OS are you using?

Linux

What is the version of your OS?

Mint Cinnamon 22.2

Describe your system

No response

Are you using OpenCL GPU in darktable?

None

If yes, what is the GPU card and driver?

No response

Please provide additional context if applicable. You can attach files too, but might need to rename to .txt or .zip

No response

JimKillock avatar Dec 11 '25 11:12 JimKillock

Try resetting the raw black/white point module or clearing the history.

Does this happen on images that failed to import some time in the past, e.g. before official support was realeased?

kmilos avatar Dec 11 '25 12:12 kmilos

Hi @kmilos this happened on initial import, on a fresh install of Darktable with images shot with a new camera. I did previously import some NEF files with other compression methods, for which Darktable 5.2.1 gives an error message, that it not recognise the format.

I have resolved the problem for myself by adding a profile to the "raw black / white point" module with the correct defaults. ChatGPT also advised to add a file ~/.config/darktable/camconst.json with the following:

{ "camera_constants": [ { "make": "Nikon", "model": "Z5_2", "raw_black_level": [1008, 1008, 1008, 1008], "raw_white_level": 15892 } ] }

I've no idea if that is correct advice or not. However, I thought it worth reporting this so that other Z5 II users didn't also stumble on this issue.

JimKillock avatar Dec 11 '25 21:12 JimKillock

Try resetting the raw black/white point module or clearing the history

Re-reading your comment, I wonder if the error was triggered by some information caching from the prior image previews failing somehow? These were set in camera to RAW (high efficiency ★).

JimKillock avatar Dec 12 '25 12:12 JimKillock