ART can not read Nikon High Efficiency RAW files

Hi,

I’ve been using ART for a few years, thanks Alberto for a great piece of free software. :ok_hand:
RAW files from Olympus or Sony cameras are easily editable, no problems here. But few months ago I bought Nikon Z5 II camera and I couldn’t open *.NEF files (high efficiency) properly. Since it was new camera on the market I waited for a new version of ART hoping that it fix the problem. Unfortunately problem still exists.

Any chance to help Nikon users? :innocent:

ART can support normal NEF files. just not the high efficiency compression thing.

The high efficiency compression is patented technology and Nikon buy the patent from the third party. Therefor there is no chance for FOSS to use the technology.
You can use Adobe DNG converter to convert high efficiency NEF files to decoded DNG files.

And make sure you switch your camera to traditional lossless going forward.

Thanks for answers.
Reason why I used compressed RAW files is obvious - much smaller file size. That works fine with Sony compressed RAW - I edited those files using ART.

Need to rethink - change file fomat or change workflow…

Well for some cameras people could reverse engineer those compression formats. but there are various formats for Fuji/Canon/Nikon and others where devs weren’t so lucky so far.

You would also need to check which library is used for loading those NEF raws. e.g. it might be libraw, in which case someone would need to talk to the developer of that.

Hi @galvan
as other people pointed out, high efficiency NEF compression is not supported by any open source raw decoding library (at least that I’m aware of), that’s why it doesn’t work out of the box with ART. However, if you have access to the Adobe DNG converter, you can configure ART to use that to decode such files. This is described at Adding Support for Custom Image Formats | ART raw image processor. In detail, you need a configuration file (to put under $HOME/.config/ART/imageio or the equivalent on windows) and a loader script that calls the Adobe DNG converter. For example, this works for me on macos:

  • A configuration file called Nikon_Z5_2.txt with the following content:
[ART RAWImageIO]
Extension=nef
Make=Nikon
Model=Z5_2
ReadCommand=./load_adng_raw.sh
  • A loader command called load_adng_raw.sh, in the same dir as the config file, with the following (make sure to make it executable):
#!/bin/sh

outname=$(basename "$2")
outdir=$(dirname "$2")
"/Applications/Adobe DNG Converter.app/Contents/MacOS/Adobe DNG Converter" -d "$outdir" -o "$outname" "$1"

Quick demo:

HTH

3 Likes

Hi Alberto,

Thanks for suggestion, but I don’t have any Adobe apps on my computer. The easiest way seems to be changing to original *.NEF files which will cost some extra bytes on my disk. I can live with it. :grinning:

2 Likes

Hi,
Very cool!

I post Windows version command.


Nikon_Z5_2.txt

[ART RAWImageIO]
Extension=nef
Make=Nikon
Model=Z5_2
ReadCommand=python ./load_adng_raw.py


load_adng_raw.py

#!/usr/bin/env python3
import os
import subprocess
import sys

def convert_to_dng(input_file, output_path):
    # divide output file name and dir name
    outname = os.path.basename(output_path)
    outdir = os.path.dirname(output_path)

    # Adobe DNG Converter' path(for windows)
    converter_path = "C:\Program Files\Adobe\Adobe DNG Converter\Adobe DNG Converter.exe"

    # construction of command
    cmd = [
        converter_path,
        "-d", outdir,    # output dir
        "-o", outname,   # output file name
        input_file       # input file
    ]

    # execute the command
    try:
        subprocess.run(cmd, check=True)
        print(f"✅ finished: {output_path}")
    except subprocess.CalledProcessError as e:
        print("❌ error in conversion process")
        print(e)

if __name__ == "__main__":
    if len(sys.argv) != 3:
        print("usage: python load_adng_raw.py input file name output file name")
        sys.exit(1)

    input_file = sys.argv[1]
    output_path = sys.argv[2]
    convert_to_dng(input_file, output_path)
1 Like

@yasuo You can use Markdown code blocks here.

Thanks!

And DNG converter on wine in Linux version.

load_adng_raw.sh

#!/bin/sh

outname=$(basename "$2")
outdir=$(dirname "$2")
wine "/home/*username*/.wine/drive_c/Program Files/Adobe/Adobe DNG Converter/Adobe DNG Converter.exe" -d "Z:\""$outdir" -o "$outname" "Z:\""$1"

Hi,
In preferences of the file browser, there is “Show embedded JPEG thumbnail if raw is unedited” option. By the way, is it possible to show always embedded JPEG thumbnail? I think it is preferable for these high efficiency compressed NEF files.