-
-
Save cooljl31/ae4b8642fa972de94e725b3777a6aa8d to your computer and use it in GitHub Desktop.
Image Converter for Slack Emoji (128px) - Required: ImageMagick.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
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 | |
fi | |
for imgpath in "$@"; do | |
echo "${imgpath}" | |
mogrify -resize 128x128 -unsharp 2x1.4+0.5+0 -quality 100 -verbose $imgpath | |
echo "" | |
done | |
echo "Done" | |
exit 0 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment