Skip to content

Instantly share code, notes, and snippets.

@DASPRiD
Created September 18, 2015 11: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 DASPRiD/0007e20f13431c683100 to your computer and use it in GitHub Desktop.
Save DASPRiD/0007e20f13431c683100 to your computer and use it in GitHub Desktop.
#!/bin/bash
if [ -z "$1" ]
then
echo "No input file supplied"
fi
convert $1 \
-trim -resize 512x512 \
\( -clone 0 -background white -shadow 100x2+0+0 -channel A -level 0,5% +channel \) \
-reverse -background none -layers merge +repage \
\( -clone 0 -background black -shadow 25x5+5+5 \) \
-reverse -background none -layers merge +repage \
-resize 512x512 -gravity center -extent 512x512 \
$1.sticker.png
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment