1
\$\begingroup\$

I have ~9k NEF photos from a Nikon D5000 that are currently taking up ~100GB. It's been 8+ years without me touching them, so I don't see a reason to assume I will ever process and edit them.

I'd like to batch convert them to a bitmap format to save space, and I want them to look as close as possible to what the image would have looked like on my camera screen at the time (as I was probably optimizing for that). I was thinking the best option would be to batch-convert with Capture NX-D, but it seems to mess with the colors compared to the standard NEF preview in MacOS (some problems I've noticed are less vivid colors, lost detail, lighter shadows, and temperature changes).

My questions:

  • Is it just that I have gotten used to seeing the MacOS rendering of the images over the years, but the NX-D rendering is more accurate to what it must have been on the camera screen?
  • Logically speaking, wouldn't I want to convert to 16-bit JPEG or even HEIF/HEIC to get better quality at lower sizes? (NX-D only offers standard JPEG.)

Bonus Questions:

  • Should I just optimize for best images instead of closest to in-camera rendering? How can I do that without checking image-by-image that I like the result?
  • Is there a reason for me to keep the images in NEF instead of converting them?

This question is similar, but outdated as well as a slightly different use case - uploading duplicates at non-specified quality vs. getting the best bitmap possible in order to discard the original.

\$\endgroup\$
1
  • 2
    \$\begingroup\$ The price for 100GB hard disk space is currently less than 3 US dollars. \$\endgroup\$
    – jarnbjo
    Oct 25, 2019 at 16:29

2 Answers 2

1
\$\begingroup\$

This is very broad & ultimately you're going to have to make the call yourself…

Some points to consider.

  • JPG can't use 16-bit. It technically supports 12-bit but most apps don't, so that's probably out. Consider JPG to be 8-bit for practical purposes.

  • the Mac's preview is 'wrong' [for a given value of wrong]. CaptureNX-D knows exactly what the camera was set to at the time & can reproduce it exactly [no other app can do this, everybody else must reverse-engineer] - assuming your screen is correctly calibrated, otherwise all bets are off.

  • If you want something to convert to other than JPG or TIFF [even bigger files than NEF so out of consideration] like JPEG2000 or HEIF/HEIC then you're going to have to use a non-Nikon app & sacrifice Capture's knowledge as to what the picture 'ought' to be.

  • Your best bet to make any sort of judgement call without extensive editing/research is to grab a semi-random selection of a couple of dozen pics of different types of subject in different types of light & throw each as a batch through your potential conversion alternatives. See which you prefer.

  • Whether it's worth keeping the originals - well, HD storage is cheap as dirt these days. They could sit in a drive on a shelf for decades [or until either ExFAT or USB goes out of fashion, or the pixels fall off the disk] in case you ever change your mind.

\$\endgroup\$
1
\$\begingroup\$

I agree on @Tetsujin statement about the broad question.

For those who believe HEIF is the best way to go and really need to save some disk space, here's a script tested on Linux (Mint 21).

#!/bin/bash

for file in *.NEF
do
    rawtherapee-cli -b16 -d -n -o /tmp/$file.png -c $file
    heif-enc -q 50 -b 12 /tmp/$file.png -o $file.heif
    rm /tmp/$file.png
    exiftool -overwrite_original -TagsFromFile $file $file.heif
done

The script applies to all *.NEF files in the current folder.

RawTherapee command line interface rawtherapee-cli converts NEF file to a temporary PNG file -n with 16 bits per channel colour depth -b16 (which is good for future retrieval details from shadows etc).
(Other command line converters can be used instead.)

The command heif-enc from libheif-examples package converts the temporary PNG file to the final HEIF file. Note the -q 50 (quality = 50% param). You can play with the number or use -L instead (lossless compression).
The -b 12 parameter is the HEIF bit depth (only default 10 and 12 bpc are currently supported).

After encoding to HEIF format, the temporary PNG file can be safely deleted.

The last line copies EXIF info from the original NEF file to the final HEIF file.

\$\endgroup\$
2
  • \$\begingroup\$ If I was being pedantic I'd say to create the temporary file with mktemp \$\endgroup\$
    – Peter M
    Sep 28, 2022 at 17:19
  • \$\begingroup\$ Good point, thanks. \$\endgroup\$ Sep 28, 2022 at 19:40

Your Answer

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