raster in, vector out
Examples gallery
Every picture below was traced by swift-potrace itself. Each card lists the exact flags used, so the gallery doubles as a cheat-sheet for the options.
Faces
A tiny hand-drawn portrait — lots of curves and fine detail.
Default trace
potrace -i faces.png -o faces.svg Straight out of the box: every black region becomes a smooth vector path.
Gaussian anti-alias
potrace -i faces.png -o faces.svg --anti-alias --anti-aliasing-algorithm gaussian Softens the jagged 1-bit edges before tracing for gentler curves.
Sharp corners (alphamax 0)
potrace -i faces.png -o faces.svg --alphamax 0.0 Keeps every corner crisp — nothing gets rounded.
Rounded (alphamax 1.34)
potrace -i faces.png -o faces.svg --alphamax 1.34 The opposite extreme: corners are rounded as much as the tracer allows.
Drop speckles (turdsize 50)
potrace -i faces.png -o faces.svg --turdsize 50 Discards any blob 50px² or smaller — handy for noisy scans.
Inverted
potrace -i faces.png -o faces.svg --invert Traces the white regions instead of the black ones.
Letters
Chunky lettering — great for showing how edges are smoothed.
Default trace
potrace -i letters.png -o letters.svg Faithful vector outline of the pixelated source.
Anti-alias off
potrace -i letters.png -o letters.svg Hard stair-stepped edges, traced exactly as drawn.
Gaussian anti-alias
potrace -i letters.png -o letters.svg --anti-alias --anti-aliasing-algorithm gaussian Blurs first, so the stair-steps melt into smooth strokes.
Keep detail (turdsize 2)
potrace -i letters.png -o letters.svg --turdsize 2 The default — tiny features survive.
Drop speckles (turdsize 50)
potrace -i letters.png -o letters.svg --turdsize 50 Small counters and dots vanish.
Abstract
Free-form shapes that stress the corner and curve fitting.
Default trace
potrace -i abstract.png -o abstract.svg A balanced blend of smooth curves and crisp corners.
Supersample 4×
potrace -i abstract.png -o abstract.svg --anti-alias --anti-aliasing-algorithm supersample --anti-alias-supersample-factor 4 Upsamples 4× before tracing for extra-smooth contours.
Sharp corners (alphamax 0)
potrace -i abstract.png -o abstract.svg --alphamax 0.0 Every vertex stays a hard corner.
Rounded (alphamax 1.34)
potrace -i abstract.png -o abstract.svg --alphamax 1.34 Maximum rounding for a soft, bubbly look.