Skip to content

Instantly share code, notes, and snippets.

@RuslanZavacky
Forked from hugooliveirad/nefToJpeg.sh
Last active May 27, 2017 12:33
Show Gist options
  • Select an option

  • Save RuslanZavacky/380afca1a6e4172994e2371ec71f3c8f to your computer and use it in GitHub Desktop.

Select an option

Save RuslanZavacky/380afca1a6e4172994e2371ec71f3c8f to your computer and use it in GitHub Desktop.
Convert RAW images (.NEF) to jpeg and create shareble versions
#!/bin/sh
processExport() {
t="$(/usr/bin/GetFileInfo -d "$1")";
jpg=`basename $1`;
jpg="${jpg%.*}.jpg";
sips -s format jpeg -s formatOptions 90 "$1" --out "$jpg";
/usr/bin/SetFile -m "$t" -d "$t" "$jpg";
}
export -f processExport
find `pwd` -name '*.NEF' | parallel --eta -j+1 processExport
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment