Skip to content

Instantly share code, notes, and snippets.

@alexarje
Created September 13, 2019 22:15
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save alexarje/a0c4979a88c22f366457b25c19365d75 to your computer and use it in GitHub Desktop.
Save alexarje/a0c4979a88c22f366457b25c19365d75 to your computer and use it in GitHub Desktop.
Create circular thumbnails in the terminal
#!/bin/bash
for i in *.jpg;
do
name=`echo $i | cut -d'.' -f1`;
convert "$i" \
\( +clone -threshold -1 -negate -fill white -draw "circle 100,100 100,0" \) \
-alpha off -compose copy_opacity -composite $name.png;
done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment