Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
Image Converter for Slack Emoji (128px) - Required: ImageMagick.
set -e
echo -e "Image Converter for Slack Emoji\nNOTICE: The image will be overwritten."
if [ $# -lt 1 ]; then
echo "USAGE:"
echo -e " ${0} IMG_FILE [IMG_FILE...]\n"
echo "IMG_FILE:"
echo -e " Path of an image file. (e.g. foo.png)\n"
exit 1
for imgpath in "$@"; do
echo "${imgpath}"
mogrify -resize 128x128 -unsharp 2x1.4+0.5+0 -quality 100 -verbose $imgpath
echo ""
echo "Done"
exit 0

This comment has been minimized.

Copy link

@zamber zamber commented Mar 20, 2017

Or just use an alias in bash/zsh:

alias slackmojify="mogrify -resize 128x128 -unsharp 2x1.4+0.5+0 -quality 100 -verbose"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.