Skip to content

Instantly share code, notes, and snippets.

@cmbuckley
Created February 21, 2019 16:59
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 cmbuckley/fcd47f1a27cc240e01a2368e26c88bc6 to your computer and use it in GitHub Desktop.
Save cmbuckley/fcd47f1a27cc240e01a2368e26c88bc6 to your computer and use it in GitHub Desktop.
Add outer glow to images with transparent background
# Add 5px transparent border
convert file.png -bordercolor transparent -border 5 file-border.png
# Add a 3px blur based on the alpha channel
convert file-border.png \( +clone -background '#777777' -shadow 100x1+0+0 -channel A -level 0,100% -blur 0x3 \) -compose DstOver -gravity center -composite file-glow.png
# TODO combine the above
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment