Skip to content

Instantly share code, notes, and snippets.

@pfernique
Created December 12, 2017 09:37
Show Gist options
  • Save pfernique/e767e5301e5bd24ccd6bc1b68a8f3c01 to your computer and use it in GitHub Desktop.
Save pfernique/e767e5301e5bd24ccd6bc1b68a8f3c01 to your computer and use it in GitHub Desktop.
svg2png using Inkscape
for n in $(ls *svg | sed 's/.svg//'); do
inkscape -z -e $n.png $n.svg
convert $n.png -trim +repage $n-trimmed.png
rm $n.png
mv $n-trimmed.png $n.png
done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment