Skip to content

Instantly share code, notes, and snippets.

@Wendelstein7
Created May 28, 2020 19:14
Show Gist options
  • Save Wendelstein7/7851788be0856bdbe4e4da3d7358a3e4 to your computer and use it in GitHub Desktop.
Save Wendelstein7/7851788be0856bdbe4e4da3d7358a3e4 to your computer and use it in GitHub Desktop.

imagemagick batch convert .svg files to .png files with transperant background and higher resolution.

imagemagick: http://www.imagemagick.org/script/download.php#windows

svg files must be in a .\svg folder relative to executing path. output dir will be .\png

Powershell script:

mkdir .\png
$files = Get-ChildItem .\svg\
foreach ($file in $files) { magick convert -density 2560 -background none .\svg\$file .\png\$file.png }
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment