Skip to content

Instantly share code, notes, and snippets.

Created Jun 17, 2010
What would you like to do?
csvg — create SVG from a bitmap image
# convert bitmap to SVG, works well with pen and ink drawings ..
set -e
for file in "$@"
# lose suffix to grab file basename
suffix=$(echo "$file" | sed 's/.*\.//')
svg=$(basename "$file" ".$suffix").svg
# convert to pixmap using
convert "$file" $pnm
# trace bitmap using
potrace -s -o "$svg" $pnm
rm $pnm
exit 0
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment