I have dozens of pictures in RAW .NEF format from a Nikon camera that I want to convert to JPEG. I found this page with a Script-fu plugin that has a batch mode. I installed GIMP and UFRAW with:

brew cask install gimp
brew install ufraw

Running the script in batch caused a hang of GIMP with this dialog box, where clicking the button causes the text in the dialog to go gray and file-glob appears in white.

Hung GIMP with dialog box

I tried converting only one file and got this error:

NEF to JPG Message

Error while executing NEFtoJPG:

Error: eval: unbound variable: file-ufraw-load 

This is the line of Script-fu code that uses that variable:

(image (car ( file-ufraw-load RUN-NONINTERACTIVE infile infile) ))

So I assume that GIMP cannot connect to the UFRAW library. The page above has no solution about it.

How can I batch convert NEF files into JPEG, in GIMP or another program?

  • 1
    IMHO Gimp is ill-suited for this. Many demosaicing standalone apps (not Gimp plugins) can reapply the "recipe" you set-up on one file to a bunch of others. otherwise Tetsujin has a point, the app's default processing may not be close enough to the camera's own processing which is better mimicked by the manufacturer's own app.
    – xenoid
    Nov 30, 2019 at 21:37

2 Answers 2


If you use Nikon's own ViewNX-i [available for free from Nikon] it can
Link edited to hopefully now always find the latest version

a) batch convert to jpg [Export, set parameters, Convert]

& more importantly …

b) make a much better job of knowing what the camera's settings were supposed to be than any 3rd party app.

enter image description here


GIMP does not support UFRAW. Open a RAW file directly in GIMP and you'll see this error:

GIMP Message

Opening '/path/to/file/_DSC0001.NEF' failed: There is no RAW loader installed to open 'Raw Nikon' files.

GIMP currently supports these RAW loaders:
- darktable (http://www.darktable.org/), at least 1.7
- RawTherapee (http://rawtherapee.com/), at least 5.2

Please install one of them in order to load RAW files.

That script is tied to UFRAW, which is no longer compatible. The script will not run with DarkTable installed.

Instead, you can use DarkTable to export and do many other things, such as High Dynamic Range from a single photo. Install with brew cask install darktable, then export with the steps from this thread:

  • Open photos in Darktable (e.g., drag-and-drop)
  • click on lighttable on the top right, then on the right bar select > select all, or select relevant photos manually
  • export options, and set your preferred storage options (e.g. JPEG, compression level, etc.)
  • scroll down the right bar, click export selected, and give your settings in storage options
  • click export

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.