Created
June 25, 2015 06:20
-
-
Save TexRx/176f8adf9b5d8a571e53 to your computer and use it in GitHub Desktop.
use sips to resize images in folder - bash func
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
resize () { | |
local ext="${1:?Usage: resize-all <png|jpg|jpeg|gif> 800}" | |
local size="${2:-800}" | |
for f in *.$ext ; do sips -Z $size $f ; done | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment