diff --git a/resize-images.sh b/resize-images.sh new file mode 100755 index 0000000..e7051e8 --- /dev/null +++ b/resize-images.sh @@ -0,0 +1,15 @@ +#!/bin/sh + +ORIGSIZE=1041 +ORIGLX=115 +ORIGLY=200 +ORIGRX=1445 +ORIGRY=360 +NEWSIZE=500 + +for f in $*; do + echo "Converting $f" + i=`basename $f .jpg` + convert $f -crop "$ORIGSIZE"x"$ORIGSIZE"+"$ORIGLX"+"$ORIGLY" +repage -resize "$NEWSIZE"x"$NEWSIZE" -bordercolor white -border 1 "$i"-l.png + convert $f -crop "$ORIGSIZE"x"$ORIGSIZE"+"$ORIGRX"+"$ORIGRY" +repage -resize "$NEWSIZE"x"$NEWSIZE" -bordercolor white -border 1 "$i"-r.png +done