Created

Embed URL

HTTPS clone URL

SSH clone URL

You can clone with HTTPS or SSH.

Download Gist

Convert png to svg using imagemagick and potrace

View png2svg.sh
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17
#!/bin/bash
 
if [ "$1" == "" ]; then
echo Usage: $0 pngfile
exit 0;
fi
 
FILE=`basename $1 .png`
 
if [ ! -e $FILE.png ]; then
echo $FILE.png does not exist
exit 1;
fi
 
convert $FILE.png $FILE.pnm
potrace -s -o $FILE.svg $FILE.pnm
rm $FILE.pnm

Can you please reply me with the code (.bat file) for Windows version??

Wow thanks for this! Really useful <3

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.