Created
July 2, 2016 19:50
-
-
Save martin-ueding/892c33ffc36d00923ed3f0efecdc2e3f to your computer and use it in GitHub Desktop.
This file contains 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 | |
# Copyright © 2016 Martin Ueding <dev@martin-ueding.de> | |
set -e | |
set -u | |
set -x | |
width=2480 | |
half_height=$(( 3508 / 2 )) | |
for img in *.jpg | |
do | |
convert $img -crop ${width}x${half_height}+0+0 -rotate -90 ${img%.jpg}-right.jpg | |
convert $img -crop ${width}x${half_height}+0+${half_height} -rotate -90 ${img%.jpg}-left.jpg | |
done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment