Advertisement
Guest User

Untitled

a guest
Sep 13th, 2013
829
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Bash 0.27 KB | None | 0 0
  1. #!/bin/bash
  2.  
  3. mkdir out
  4. for a in *.jpg; do
  5.   convert "$a" -crop 50%x100% ./out/"${a%.jpg}".jpg; done
  6.  
  7. #ImageMagick renames the left half of the crop to end with 0, need the right half alphabetically first
  8. cd out
  9. for b in *0.jpg; do
  10.   mv "$b" "./${b%.jpg}"2.jpg; done
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement