Small script to cut and resize images.
This commit is contained in:
parent
bd516dc86c
commit
14112eb6b6
|
@ -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
|
Reference in New Issue