Created
May 10, 2017 14:00
-
-
Save jeremyboggs/dc7df529a694b244f5b9c9411f504ef6 to your computer and use it in GitHub Desktop.
Some random bash stuff
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
## Generate cropped thumbnails of images. | |
makethumbnails() { | |
for f in *.jpg; do | |
filename=$(basename "$f") | |
extension="${filename##*.}" | |
filename="${filename%.*}" | |
convert "$f" -flatten -thumbnail 150x150^ -gravity Center -crop 150x150+0+0 "$filename"_small.jpg; | |
done | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment