Created
October 4, 2016 12:06
-
-
Save homam/e5bc58b00ca1234eecf7906f6daef5c3 to your computer and use it in GitHub Desktop.
ImageMagick Round a Image - Mask
This file contains 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
mkdir -p thumbs | |
for f in *.jpg; do | |
size=$(identify -format "%[fx:w]" $f) | |
sizeh=$(expr $size / 2) | |
convert -size "$size"x"$size" xc:none -fill $f -draw "fill white circle $sizeh,$sizeh $sizeh,1" thumbs/$f.png | |
; done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment