Directory Compare FCRS-1.0 /llms.txt
← Back to Directory

Potrace

$ potrace Community Low Risk
Peter Selinger · AI & Media · GPL-2.0-or-later · macos / linux / windows

potrace transforms bilevel raster bitmaps (PBM, PGM, PPM, BMP) into smooth, scalable vector curves across backends (-b svg, -b pdf, -b eps, -b dxf, -b geojson). Paired with bundled mkbitmap, it converts monochrome scans, logos, and silhouettes cleanly.

FCRS-1.0 Score
77 /100
Good
Medium Confidence
Zero-Friction Install
brew install potrace
CLI vs MCP Decision CLI Only

Deterministic bitmap-to-SVG vector tracing runs locally in milliseconds without MCP.

Agent-Readiness Checklist

— JSON Output
— Field Filtering
✓ Non-Interactive
— Dry-Run
— Read-Only Mode
✓ NO_COLOR Clean
— Self-Describing
— Official SKILL.md

Static evaluation (not yet probed on this host). Run npm run data:probe locally to capture live verification.

FCRS-1.0 6-Dimension Breakdown

Agent-Readiness 17 / 25

Fast non-interactive C CLI with -o - stdout support and -b geojson backend, though lacks JSON inspection and --dry-run.

  • Supports -o - stdout and multiple -b vector backends
  • Rejects PNG/JPEG directly (requires BMP/PNM)
Trust & Safety 21 / 25

Never mutates input bitmaps; writes either to -o or <stem>.<ext>.

  • Non-destructive to input bitmaps; -o - avoids disk writes
Setup & Portability 13 / 15

Zero-dependency C binary packaged on Homebrew, Linux distros, and Windows.

  • Available via brew install potrace and SourceForge
Utility & Efficiency 12 / 15

Produces clean single-color SVG/PDF/GeoJSON paths, though multi-color tracing or PNG input requires preprocessing (mkbitmap, magick).

  • Only traces bilevel/grayscale PNM and BMP inputs natively
Maintenance & Lineage 7 / 10

Stable veteran utility by Peter Selinger (potrace.sourceforge.net) with infrequent maintenance updates.

  • Mature codebase maintained by Peter Selinger
Docs & Verifiability 7 / 10

Thorough man page and -h help covering corner thresholds (-a), despeckling (-t), and backends (-b).

  • Man page hosted at potrace.sourceforge.net/potrace.1.html

Security, Auth & Guardrails

Auth Modes
No Auth
Credential Storage

None required; operates on local bitmap files or stdin/stdout.

Side Effects
Read-Only Local Write
Cost & Quotas

Free GPL-2.0-or-later open-source C binary.

Copyable Guardrail for CLAUDE.md / AGENTS.md
# Potrace Agent Rules
- `potrace` only reads PBM/PGM/PPM/BMP—convert PNG or JPEG inputs to BMP/PGM first via `magick` or `vips`.
- Pass `-s` (for SVG) and `-o <out.svg>` explicitly, because default output is EPS (`<input>.eps`).

Agent-Ready Command Recipes

Safe Read-Only Queries

Trace a bitmap to SVG on stdout without writing disk
potrace -s -o - logo.bmp

Outputs traced SVG XML directly to stdout (-o -) while keeping logo.bmp untouched.

Controlled Writes & Previews

Vectorize a BMP image into an SVG file
potrace -s bitmap.bmp -o vector.svg

Traces bitmap.bmp into smooth Bézier paths saved to vector.svg.

Strengths for Agents

  • + Produces mathematically smooth, compact Bézier SVG/PDF/GeoJSON paths from bitmaps.
  • + -o - allows clean stdout piping for SVG inspection without temporary files.

Caveats & Pitfalls

  • ! Does not read PNG or JPEG files directly; requires conversion to BMP/PBM/PGM first.
  • ! Defaults to EPS output unless -s (-b svg) or another -b backend is specified.

Tested Agent Hosts

Claude Code Codex CLI Gemini CLI