Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
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