Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #!/bin/bash
- mkdir out
- for a in *.jpg ; do
- if (( $(identify -format "%w" "$a") > 1200 ))
- then convert "$a" -crop 50%x100% ./out/"${a%.jpg}".jpg
- else cp "$a" ./out
- fi
- done
- cd out
- for b in *-0.jpg ; do
- mv "$b" "./${b%.jpg}"2.jpg
- done
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement