Vectorizing with Potrace

Kind of expected that between Affinity Photo and Affinity Designer, it would be relatively simple to make a vectorized tracing of an image, similar to the result from the Adobe Capture application.

Apparently the auto-tracing feature is not yet developed for Affinity and in the forums someone recommended a command line tool called Potrace.

Install via Homebrew: brew install potrace.

Of course I had to run brew doctor and brew update and before those would work, install the latest version of XCode and update the permissions on /usr/local/lib/ and share, maybe they changed with the OSX Upgrade.

sudo chown -R `whoami`:admin /usr/local/lib/
sudo chown -R `whoami`:admin /usr/local/share/

Potrace comes with another program that the author recommends you run first: mkbitmap, which runs various filters on bitmap files. First I need to convert to a bitmap. OSX comes with a command line util that does this called sips.

sips -s format bmp PorchChairMaster.jpg --out PorchChairMaster.bmp

Now let see what potrace PorchChairMaster.bmp does. Not bad. Outputs an EPS file.

Even better: potrace PorchChairMaster.bmp --svg

Now let’s see what it looks like when we run mkbitmap LloydWithBricksMaster.bmp first.

I made a bash script to automate this for me: