skillfed

potracer

Python Potrace

potracer v0.0.4 88.1K downloads/30d#13,749 on PyPI166
Copyleft license GPLv2+ DORMANT released

What it is and what it does

Potracer is a pure Python implementation of Peter Selinger's Potrace, an algorithm for converting bitmap images into vector graphics by tracing their outlines. Unlike other Python bindings to Potrace such as pypotrace, this port avoids compilation and OS-specific installation issues by implementing the algorithm entirely in Python, making it compatible across platforms.

The library is designed as a drop-in replacement for pypotrace, so existing code using that library can often switch to potracer without modification. It depends only on numpy for bitmap handling. The trade-off is speed: being pure Python, it runs approximately 500x slower than the original C implementation, but remains practical for general use. An optional CLI extra is available for command-line tracing operations.

Use it for:

  • Convert scanned documents or hand-drawn sketches to scalable vector formats without compilation hassles.
  • Batch-process bitmap images to vectors in Python scripts where C dependencies are unavailable or problematic.
  • Replace pypotrace in existing projects when installation or OS compatibility becomes an issue.
  • Integrate image vectorization into cross-platform Python applications without native library dependencies.
  • Trace logo artwork or simple graphics from raster sources for design workflows.

Worth the install?

AI-flagged interpretation of the facts on this page — verify before relying

Converts bitmap images to vector graphics by tracing outlines, implemented in pure Python as a port of Peter Selinger's Potrace algorithm.

Yes, if you need image vectorization and want to avoid compilation or OS-specific installation problems. The pure Python approach trades speed for universal compatibility. Maintenance is dormant but stable—no active development, but no known vulnerabilities and the repository remains unarchived. Suitable for general use unless you need production-grade performance on large batches.

Install

potracer on PyPI

pip

pip install potracer

uv

uv add potracer

poetry

poetry add potracer

Installing potracer

Before you install

Low friction installation with a single runtime dependency (numpy). Dormant maintenance status—last release was in January 2022—but the repository remains active and unarchived with no known security vulnerabilities.

License in practice

Licensed under GPLv2+ (copyleft). Any derivative work or distribution must be released under compatible terms. The license also permits relicensing under Peter Selinger's original Potrace terms if those become more permissive.

Quickstart

pip install potracer
import potracer
# Trace a bitmap to vector paths
tracer = potracer.Potrace(bitmap_data)
vectors = tracer.trace()

Requires numpy for bitmap structures. Pure Python implementation is approximately 500x slower than the original C version.

Verify before relying

  • Exact API compatibility with pypotrace and whether it truly functions as a drop-in replacement in all scenarios.
  • Whether the optional CLI extra (potrace-cli) is actively maintained separately.
  • Real-world performance characteristics and whether 500x slowdown is acceptable for your use case.

Package facts

License GPLv2+ (copyleft)
Python support not specified
Install friction low — pure-Python wheel
Runtime dependencies 1 — numpy
Maintenance dormant — 1,661 days since the last release
Last repo commit
First released
Downloads 88,080/month — #13,749 on PyPI (30-day window, as of 2026-08-14)
Known vulnerabilities none known (OSV.dev, checked 2026-08-14)

Evidence: potracer-0.0.4-py2.py3-none-any.whl

Development Status :: 5 - Production/StableIntended Audience :: DevelopersLicense :: OSI Approved :: GNU General Public License v2 or later (GPLv2+)Operating System :: OS IndependentProgramming Language :: PythonProgramming Language :: Python :: 3.6Programming Language :: Python :: 3.7Programming Language :: Python :: 3.8Programming Language :: Python :: 3.9Topic :: Multimedia :: GraphicsTopic :: Multimedia :: Graphics :: Graphics ConversionTopic :: Utilities

Tags

bitmap to vector tracingimage vectorization pythonpotrace python portoutline tracing algorithmraster to vector conversionimage edge detection tracingvectorize bitmap images
image-processingvectorizationpure-python

More Utilities packages