A bash script for MAC OS to export SVG files to PNG for Android/iOS projects.
To install, paste and enter each line in your terminal
Install X-Code Command Line Tools
xcode-select --install
Install Homebrew
/usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
Install Image Magick
brew install imagemagick --use-rsvg
Open terminal and use the syntax below:
sh /path_to_file/resize.sh /path_to_svg_folder/
You can also type "sh" on terminal, drag the resize.sh file and later drag the svg folder.
The script will search for all .svg files inside all folders (recursively) in the given path and for each .svg will create:
- Android PNG files
- hdpi - 48x48
- mdpi - 72x72
- xhdpi - 96x96
- xxhdpi - 144x144
- xxxhdpi - 192x192
- iOS PNG files with .imageset
- Navigation Bar and ToolBar icon sizes (22x22 + @2x @3x sizes)
- Tab Bar and standard icon sizes (25x25 + @2x @3x sizes)
- PNG Thumb
- For general thumbs and uses inside the application (300x300)
Search for SVG files recursively Supports SVG -> PNG transparency