Last active
October 9, 2017 21:33
-
-
Save hashd/a9875a68b9f839bd24b809fee75da243 to your computer and use it in GitHub Desktop.
Batch convert NEF to jpg in Linux/macOS [Prerequisites: ImageMagick, ufraw-batch]
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# Change to directory at first argument or use the current folder | |
if [ ! -z "$1" ]; then | |
cd "$1" | |
fi | |
mkdir -p jpeg | |
for file in *.NEF; do | |
filename="${file%.NEF}.jpg" | |
echo "Converting $file to $filename" | |
# Add these flags to convert and attempt auto enhancement | |
# --channel rgb -auto-level -enhance -equalize -contrast | |
convert $file $filename | |
mv $filename jpeg/ 2>/dev/null | |
rm $file | |
done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
What does
jpeg/ 2>/dev/null
mean?