Skip to content

Instantly share code, notes, and snippets.

@homam
Created October 4, 2016 12:06
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
Star You must be signed in to star a gist
Embed
What would you like to do?
ImageMagick Round a Image - Mask
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