Last active
August 29, 2015 14:03
-
-
Save lsfalimis/0ef1cc32004d5aef4fe6 to your computer and use it in GitHub Desktop.
Run in terminal: bash /path/to/RenrenResize.sh /path/to/folder
This file contains hidden or 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
#!/usr/bin/bash | |
for file in $1/* | |
do | |
width=$(sips -g pixelWidth "$file" | cut -s -d ':' -f 2 | cut -c 2-) | |
if (($width>720)); then | |
sips --resampleWidth 720 "$file" | |
fi | |
done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment