summaryrefslogtreecommitdiffstats
path: root/round-corners.sh
blob: 62b984d41de61ad9bc7c42c9ec2bf9deb50bfdc2 (plain)
1
2
3
4
5
6
7
8
9
10
#!/bin/zsh

for i in "$@"; do
convert $i \
     \( +clone  -alpha extract \
        -draw 'fill black polygon 0,0 0,8 8,0 fill white circle 8,8 8,0' \
        \( +clone -flip \) -compose Multiply -composite \
        \( +clone -flop \) -compose Multiply -composite \
     \) -alpha off -compose CopyOpacity -composite  rounded_$i.png
done