Created
February 16, 2017 19:26
-
-
Save raoulwegat/ff9ab3c2e348d3f3fc42e6c425662a2a to your computer and use it in GitHub Desktop.
Convert SVG to PNG
This file contains 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 | |
# Batch convert SVG to PNG. Useful for creating new sizes of twemoji. | |
# Uses https://wiki.gnome.org/Projects/LibRsvg. On macOS install with 'brew install librsvg' | |
for file in svg/*.svg | |
do | |
filename="$(basename $file)" | |
name=$(echo $filename | cut -f 1 -d '.') | |
echo "Converting $file to $name.png" | |
rsvg-convert -h 36 -w 36 $file > 36x36/$name.png | |
done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment