Created
August 28, 2012 14:56
-
-
Save dogmatic69/3498758 to your computer and use it in GitHub Desktop.
convert nikon NEF files to png
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 | |
################################## | |
# Convert files to png # | |
# # | |
# # | |
################################## | |
files=`ls ./`; | |
if [ ! -d png ] | |
then | |
mkdir png; | |
fi | |
for file in $files | |
do | |
in=./$file; | |
out=./${file%.*}".png"; | |
if [ ! -f $out ] | |
then | |
echo "converting $file"; | |
convert "$in" -resize 1024x1024 "$out" ; | |
mv $out png/; | |
fi | |
done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Simple script for generating previews using imagemagic.
the -resize option of 1024x1024 will generate a image with max width or height (which ever is larger) of 1024. There are loads of other options
http://www.imagemagick.org/script/command-line-options.php#resize
http://www.imagemagick.org/script/command-line-processing.php#geometry