Small script to cut and resize images.

This commit is contained in:
Bram Senders 2010-05-28 15:43:57 +02:00
parent bd516dc86c
commit 14112eb6b6
1 changed files with 15 additions and 0 deletions

15
resize-images.sh Executable file
View File

@ -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