Skip to content

Instantly share code, notes, and snippets.

@lsfalimis
Last active August 29, 2015 14:03
Show Gist options
  • Save lsfalimis/0ef1cc32004d5aef4fe6 to your computer and use it in GitHub Desktop.
Save lsfalimis/0ef1cc32004d5aef4fe6 to your computer and use it in GitHub Desktop.
Run in terminal: bash /path/to/RenrenResize.sh /path/to/folder
#!/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