pure-swift bitmap tracer

Sketch your bitmaps into SVG.

swift-potrace is a tiny command-line tool that traces round, chunky raster PNGs into smooth, scalable vectors — the Potrace algorithm, reimagined in pure Swift 6. No dependencies, runs on macOS and Linux.

Get the latest build See it trace

A small, pixelated black-and-white raster drawing of faces
1-bit PNG in
The same faces drawing traced into smooth vector curves
clean SVG out

What it does

Reads PNG

Decodes your raster with bundled stb_image — no system image libraries, nothing to install.

Traces curves

Fits smooth Bézier paths to every region, with corner and curve controls so you decide how crisp or rounded the result feels.

Writes SVG

Outputs tidy, resolution-independent SVG to a file or straight to stdout for piping.

Quickstart

Build it

$ swift build -c release

…or grab a prebuilt binary below.

Trace something

$ potrace --input drawing.png --output drawing.svg

Full options live in the docs.

Download the latest build

Latest build v1.0.4-beta-3 · 27 Jun 2026

macOS (Apple Silicon)

potrace · arm64

517.5 KB
sha256 6e8b511c6278…

Download

Linux (x86_64)

potrace · x86_64

1.2 MB
sha256 44367ed53042…

Download

Prebuilt by CI on every release and published here automatically. Prefer to build from source? See the documentation.

Traced in the wild

Browse the gallery