Created
June 26, 2020 17:45
-
-
Save alexkuang0/03d3d89b537a375f1e8252097cd63584 to your computer and use it in GitHub Desktop.
Batch converting 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
for svg in $(ls ./svg); do | |
filename=$(echo $svg | cut -d'.' -f1) | |
convert -background none -density 1000 -resize 1000x svg/$(echo $filename).svg png/$(echo $filename).png | |
echo [DONE] $filename converted! | |
done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Convert all SVG files in
svg
subdirectory to PNG files (1000x1000 with transparent background) and save them inpng
subdirectory using ImageMagick®.Install ImageMagick® before running this script.