Skip to content

Instantly share code, notes, and snippets.

View Willus8888's full-sized avatar

Willus Willus8888

View GitHub Profile
@curtisgibby
curtisgibby / svg-to-500px-png-with-padding.ps1
Last active January 17, 2022 10:48
Powershell script to use imagemagick to convert a directory of SVGs to PNGs (with 10% padding)
$svgs = Get-ChildItem (".\*") -Filter *.svg
$scriptPath = $MyInvocation.MyCommand.Path
$scriptDirectory = Split-Path $scriptPath
$outputDirectory = $scriptDirectory + "\output"
# Replace specific path as needed
$magickExePath = "C:\Program Files\ImageMagick-7.0.8-Q16\magick.exe"
ForEach($svg in $svgs) {
Write-Host $svg