Created
June 8, 2016 18:06
-
-
Save ChaseIndustries/41b3e887df5398c48dc6a27b46c44594 to your computer and use it in GitHub Desktop.
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
#!/bin/bash | |
for f in ./*.png | |
do | |
FILE=$f | |
FILENAME=${f%.*} | |
if [ ! -e $FILE ]; then | |
echo $FILE.png does not exist | |
exit 1; | |
fi | |
convert $FILE -fx 'a==0 ? white : u' $FILENAME.pnm | |
mkdir converted | |
potrace -s -o converted/$FILENAME.svg $FILENAME.pnm | |
rm $FILENAME.pnm | |
done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment