Roland Tanglao
About

HowTo: Circular Crop with ImageMagick

Aug 15, 2019

Pontifications

  • See How can I combine these commands to achieve circular crop in ImageMagick?
  • Gotta try this with my Berlin July 2019 photos and then make a collage of these circular crops!

Code

convert -size 200x200 xc:Black -fill White -draw 'circle 100 100 100 1' -alpha Copy mask.png

for f in $(ls *.jpg)
do
  convert $f -gravity Center mask.png -compose CopyOpacity -composite -trim ${f}_output.png
done

Leave a comment on github

Roland Tanglao

  • Roland Tanglao
  • roland@rolandtanglao.com
  • rtanglao
  • rtanglao

flickr.com/roland, twitter.com/rtanglao #firefox #thunderbird