Created
July 16, 2020 14:09
-
-
Save DanielCardonaRojas/27b94da3a59c26f0e4ad551edb83eda6 to your computer and use it in GitHub Desktop.
Generate ios images from svg #svg #ios #png #images
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
# gen_ios_icons.sh | |
# Params: (filename) (width 1x) (height 1x) | |
# Get filename without an extension | |
filename=$1 | |
filename_length=${#1} | |
name_length=$((filename_length-4)) | |
name=${filename:0:$name_length} | |
mkdir $name | |
rsvg-convert -w $2 -h $3 $filename > $name/$name.png | |
rsvg-convert -w $((2*$2)) -h $((2*$3)) $filename > $name/[email protected] | |
rsvg-convert -w $((3*$2)) -h $((3*$3)) $filename > $name/[email protected] |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
brew install librsvg