Skip to content

Instantly share code, notes, and snippets.

@cwoodall cwoodall/
Created Dec 29, 2016

What would you like to do?
A script for making png's from svg's. From
# credit to olibre from stackoverflow (
File_png="${1?:Usage: $0 file.png}"
if [[ ! -s "$File_png" ]]; then
echo >&2 "The first argument ($File_png)"
echo >&2 "must be a file having a size greater than zero"
( set -x ; ls -s "$File_png" )
exit 1
convert "$File_png" "$File.pnm" # PNG to PNM
potrace "$File.pnm" -s -o "$File.svg" # PNM to SVG
rm "$File.pnm" # Remove PNM
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.