Skip to content

Instantly share code, notes, and snippets.

@potix2
Created December 12, 2011 23:29
Show Gist options
  • Save potix2/1469649 to your computer and use it in GitHub Desktop.
Save potix2/1469649 to your computer and use it in GitHub Desktop.
#!/bin/sh
SRCDIR="original/"
DESTDIR="resized/"
if [ ! -d "resized" ];
then
mkdir resized
fi
#like 2100x1600+100+0
SIZE=$1
cd $SRCDIR;
for FILE in `ls *.jpg`;
do
echo $FILE
convert $FILE -crop $SIZE ../${DESTDIR}${FILE}
done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment