Skip to content

Instantly share code, notes, and snippets.

@matyapiro31
Last active August 17, 2016 14:02
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 matyapiro31/38461bf13673756fc099afd86249382c to your computer and use it in GitHub Desktop.
Save matyapiro31/38461bf13673756fc099afd86249382c to your computer and use it in GitHub Desktop.
convert test.png -geometry 900x900! -virtual-pixel transparent \
-fx "p{(i-w/2)*w/sqrt(w^2-(2*j-h)^2+1)+w/2,j}" \
#-fx "Xi=i-w/2; Yj=j-h/2; 1.0((0.5-hypot(Xi,Yj)/900.0)>0)*p" \ #cut to circle.
-transparent black \
-geometry 1050x900! test2.png
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment