Skip to content

Instantly share code, notes, and snippets.

@arth2o
Created January 29, 2017 06:42
Show Gist options
  • Save arth2o/fb2bd24f132716015377562317b32878 to your computer and use it in GitHub Desktop.
Save arth2o/fb2bd24f132716015377562317b32878 to your computer and use it in GitHub Desktop.
Batch convert raw NEF files to JPGs with exiftool from Linux command-line. 1, Exiftool have to be installed. Put this pieces of code to a file for example neftojpg.sh. chmod +x neftojppg.sh. Run: ./neftojpg.sh /directory/where/pictures/are/.
#!/bin/bash
DIR="$@"
for f in $DIR*.NEF
do
name=`echo "$f" | sed -e "s/.NEF$//g"`
exiftool -b -JpgFromRaw "$f" > "${name}.jpg"
done
@arth2o
Copy link
Author

arth2o commented Jan 29, 2017

convert image.nef image.jpg
exiftool -b -JpgFromRaw orignal.NEF > output.jpg

@xoul
Copy link

xoul commented Apr 9, 2018

I may be wrong, but ExifTool can only be used to extract JPEGs embedded in the RAW file.
That kind of JPEG is actually a non-fine image to be used as a preview while the software processes the RAW image itself.
Maybe you should go with dcraw, ufraw or even convert for a better result.

@Postroggy
Copy link

Cool, I love U so much. you're mine rollingstone

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment