Skip to content

Instantly share code, notes, and snippets.

@ChaseIndustries
Created June 8, 2016 18:06
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save ChaseIndustries/41b3e887df5398c48dc6a27b46c44594 to your computer and use it in GitHub Desktop.
Save ChaseIndustries/41b3e887df5398c48dc6a27b46c44594 to your computer and use it in GitHub Desktop.
#!/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