weberliu
8/21/2017 - 9:20 AM

convert svg to eps

convert svg to eps

#!/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
# convert jpg file
# convert input.jpg output.ppm

# convert PNG to PNM -- inversed, remove alpha channel (black on white)
# convert -negate image.png -alpha Remove image.pnm
potrace -s -o $FILE.svg $FILE.pnm
rm $FILE.pnm
#!/bin/bash
# extract gif image to multiple png/jpg images

convert img.gif -coalesce img/xx_%05d.png
# Install inkscape in osx
# brew update
# brew cask install xquartz
# brew cask install inkscape

inkscape in.svg -E out.eps --export-ignore-filters --export-ps-level=3