> [Site index](https://perfectvector.com/llms.txt) — available pages and descriptions.

# Tune Potrace Curve Tolerance for Simpler SVG Paths

> Compare Potrace opttolerance with longcurve on the same bitmap. Count cubic segments in each SVG and check what changes along the outline.

Source: https://perfectvector.com/blog/potrace-opttolerance

Language: en
Author: Irene Kim
Published: 2026-11-23T08:00:00+09:00

Start with Potrace's default `--opttolerance 0.2`. If the SVG has more curves than you want to edit, try a higher tolerance on the same bitmap. Use `--longcurve` to see the trace with curve optimization turned off. Keep the simpler version only if its outline still holds up at the size you plan to use.

## What Potrace curve tolerance changes

Curve optimization is Potrace's final pass that tries to replace adjacent Bézier segments with a single curve. Raising `--opttolerance` makes that pass more permissive, so several segments can become one at the cost of some contour accuracy. The [Potrace manual](https://www.mathstat.dal.ca/~selinger/potrace/potrace.1.html) gives 0.2 as the default.

`--longcurve` skips the curve optimization pass. The earlier corner analysis and smoothing still run. [Peter Selinger's algorithm paper, section 2.4](https://www.mathstat.dal.ca/~selinger/potrace/potrace.pdf) describes where this pass sits after the smoother has already produced curved and straight segments.

If a hole is missing from all three traces, check your bitmap and earlier settings first.

## Trace the same bitmap three ways

Use a black-and-white file, such as a [PBM bitmap](https://netpbm.sourceforge.net/doc/pbm.html). If your original is a transparent PNG or still has gray pixels, start with the [Potrace PNG-to-SVG preparation steps](https://perfectvector.com/blog/potrace-png-to-svg) and keep one prepared file for all three runs. Use distinct output names so you can compare all three SVGs.

```bash
potrace --svg --opttolerance 0.2 -o default.svg silhouette.pbm
potrace --svg --opttolerance 2 -o relaxed.svg silhouette.pbm
potrace --svg --longcurve -o longcurve.svg silhouette.pbm
```

The second run uses 2 to make the setting's effect easier to see. For a file you plan to use, try a smaller increase first and compare both versions at the final display or print size.

## Count the segments and check the shoulder

On our 240 × 176-pixel silhouette, Potrace 1.16 wrote 13 cubic segments at tolerance 0.2, 8 at tolerance 2, and 31 with `--longcurve`. Each SVG had one closed path. The resvg previews were rendered at the same 480-pixel width. The outlines look similar side by side, so the geometry count and a magnified overlay answer different questions.

![Three renders of the same black silhouette, with 13 cubic segments at default tolerance, 8 at tolerance 2, and 31 with curve optimization disabled.](https://perfectvector.com/blog/potrace-opttolerance/workflow-proof.webp)

*Potrace traced the same bitmap three times. Each result was one closed path, with the cubic segment counts taken from the SVG path data.*

Count coordinate groups, because one `c` can represent several segments. In the [SVG cubic Bézier syntax](https://www.w3.org/TR/SVG2/paths.html#PathDataCubicBezierCommands), each segment takes six numbers: two control-point pairs and one endpoint pair. In these files each lowercase `c` introduces a series of those groups. If your export includes straight segments or other commands, count them separately or make the comparison in a path editor.

Put a copy of the default trace on top of the looser one in your editor with the viewboxes aligned. Give the copies different colors and lower the top copy's opacity. Zoom into the shallow shoulder, sharp bends, and any small openings. Then return to the intended output size and decide which changes matter. Use the [vector trace quality scorecard](https://perfectvector.com/blog/evaluate-vector-trace-quality) to weigh edge fidelity and editability together.

## FAQ

### Does a higher Potrace tolerance always reduce the segment count?

The count can stay the same when a path has no additional adjacent curves Potrace can merge. Run both settings on the same prepared image and compare the emitted geometry.

### Does longcurve turn off smoothing?

No. It skips the last curve-optimization pass. Potrace still traces the bitmap and builds its earlier smoothed curves.

### Which Potrace tolerance should I start with?

Start at the default 0.2. Raise it a little if the path is more complex than your edit requires, then check the output at its intended size. Keep 0.2 or compare with `--longcurve` if a looser trace softens an important bend.

## Start with source artwork

PerfectVector can turn a raster-only logo or silhouette into editable SVG paths when you need an alternative starting trace. Use the [image-to-vector converter](https://perfectvector.com/image-to-vector) with a clean copy of the source, then open the downloaded SVG and inspect a bend at your target size before choosing a trace.

## Sources

1. [Potrace manual](https://www.mathstat.dal.ca/~selinger/potrace/potrace.1.html) — defines the curve optimization flags and default tolerance.
2. [Potrace algorithm paper](https://www.mathstat.dal.ca/~selinger/potrace/potrace.pdf) — describes smoothing and the later pass that joins eligible adjacent curves.
3. [Netpbm PBM format](https://netpbm.sourceforge.net/doc/pbm.html) — specifies the monochrome source format used in the test.
4. [SVG 2 cubic Bézier commands](https://www.w3.org/TR/SVG2/paths.html#PathDataCubicBezierCommands) — specifies how one command letter can introduce several coordinate groups.

## Explore

- [Read the HTML article](https://perfectvector.com/blog/potrace-opttolerance)
- [Potrace Turn Policy: Trace Separate Diagonal Paths](https://perfectvector.com/blog/potrace-turnpolicy.md)
- [VTracer PNG to SVG: Check Colors and Small Details](https://perfectvector.com/blog/vtracer-png-to-svg.md)
- [Product facts](https://perfectvector.com/product-facts.md)
- [FAQ](https://perfectvector.com/faq.md)
- [Pricing and credits](https://perfectvector.com/pricing.md)
