Skip to content

Instantly share code, notes, and snippets.

@martin-ueding
Created July 2, 2016 19:50
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save martin-ueding/892c33ffc36d00923ed3f0efecdc2e3f to your computer and use it in GitHub Desktop.
Save martin-ueding/892c33ffc36d00923ed3f0efecdc2e3f to your computer and use it in GitHub Desktop.
#!/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