Skip to content

Instantly share code, notes, and snippets.

@coodix
Created September 5, 2013 12:48
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 coodix/6449660 to your computer and use it in GitHub Desktop.
Save coodix/6449660 to your computer and use it in GitHub Desktop.
Remove background and add shadow by ImageMagick
$ convert f4cf6efd198523859819d78c333b63d7.jpg -bordercolor white -border 1x1 -alpha set -channel RGBA -fuzz 1% -fill none -floodfill +0+0 white -shave 1x1 coin.png
$ convert coin.png \( +clone -background black -shadow 80x3+5+5 \) +swap -background none -layers merge +repage coin.png
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment