vtracer
Python bindings for the Rust Vtracer raster-to-vector library
What it is and what it does
VTracer is a Python binding to a Rust-based raster-to-vector converter that transforms bitmap images into scalable SVG graphics. It processes images through a pipeline that can handle colored high-resolution scans as well as low-resolution pixel art, outputting compact vector files with fewer shapes than traditional tools. The package offers multiple modes: multicolor vectorization for photographs and scans, binary mode for line art and technical drawings, and configurable parameters for curve fitting, color precision, and shape hierarchy.
The tool is designed for both high-resolution document scanning (originally built for historic blueprints) and retro game artwork. It accepts input as file paths, raw image bytes, or pixel arrays, and outputs SVG strings or files. With no runtime dependencies and prebuilt wheels for most platforms, installation is straightforward on standard systems, though unsupported architectures may require compilation.
Use it for:
- Convert scanned documents or blueprints to vector format for archival, editing, or CAD integration.
- Trace pixel art or retro game graphics to scalable SVG for web or print use.
- Batch-convert photographs to stylized vector graphics with color or binary mode.
- Process image data from HTTP requests or in-memory sources without intermediate file I/O.
- Generate compact vector graphics from high-resolution images for reduced file size.
Worth the install?
AI-flagged interpretation of the facts on this page — verify before relying
Converts raster images (JPG, PNG) into vector graphics (SVG) by tracing curves and shapes, supporting both multicolor and binary (line art) modes.
Yes, if you need to convert raster images to SVG. The package is actively maintained, has no known vulnerabilities, carries a permissive MIT license, and offers a straightforward API with both file and in-memory workflows. Install friction is moderate due to compiled bindings, but prebuilt wheels cover most platforms. No runtime dependencies simplifies deployment.
Install
vtracer on PyPI
pip
pip install vtraceruv
uv add vtracerpoetry
poetry add vtracerInstalling vtracer
Before you install
Medium install friction due to compiled Rust bindings, but prebuilt wheels cover common platforms (Linux x86_64, ARM, macOS, Windows). Package is actively maintained with recent releases.
License in practice
MIT license permits commercial and private use with minimal restrictions; you may use, modify, and distribute the package freely provided you include the license notice.
Quickstart
pip install vtracer
import vtracer
# Multicolor SVG from file
vtracer.convert_image_to_svg_py('/path/to/image.jpg', '/path/to/output.svg')
# Binary (line art) mode
vtracer.convert_image_to_svg_py('/path/to/image.jpg', '/path/to/output.svg', colormode='binary')
# From raw bytes
svg_str = vtracer.convert_raw_image_to_svg(image_bytes, img_format='jpg')
Requires Python 3.7 or later; compiled wheels available for common platforms but may require build tools on unsupported architectures.
Verify before relying
- Performance characteristics and memory usage for gigapixel-scale images mentioned in description.
- Specific image formats supported beyond JPG and PNG.
- Comparison of output compactness and shape count versus Potrace or Adobe Illustrator's Image Trace in practice.
Package facts
| License | MIT (permissive) |
| Python support | supports the current Python release (>=3.7) |
| Install friction | medium — platform-specific wheel |
| Runtime dependencies | none |
| Maintenance | actively maintained — 144 days since the last release |
| First released | |
| Downloads | 298,924/month — #7,866 on PyPI (30-day window, as of 2026-08-14) |
| Known vulnerabilities | none known (OSV.dev, checked 2026-08-14) |
Evidence: vtracer-0.6.15-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl; vtracer-0.6.15-cp310-cp310-manylinux_2_17_armv7l.manylinux2014_armv7l.whl; vtracer-0.6.15-cp310-cp310-manylinux_2_17_i686.manylinux2014_i686.whl; vtracer-0.6.15-cp310-cp310-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl; vtracer-0.6.15-cp310-cp310-manylinux_2_17_s390x.manylinux2014_s390x.whl; vtracer-0.6.15-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl; vtracer-0.6.15-cp310-cp310-musllinux_1_2_aarch64.whl; vtracer-0.6.15-cp310-cp310-musllinux_1_2_armv7l.whl; vtracer-0.6.15-cp310-cp310-musllinux_1_2_i686.whl; vtracer-0.6.15-cp310-cp310-musllinux_1_2_x86_64.whl; vtracer-0.6.15-cp310-cp310-win_amd64.whl; vtracer-0.6.15-cp311-cp311-macosx_10_12_x86_64.whl; vtracer-0.6.15-cp311-cp311-macosx_11_0_arm64.whl; vtracer-0.6.15-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl; vtracer-0.6.15-cp311-cp311-manylinux_2_17_armv7l.manylinux2014_armv7l.whl; vtracer-0.6.15-cp311-cp311-manylinux_2_17_i686.manylinux2014_i686.whl; vtracer-0.6.15-cp311-cp311-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl; vtracer-0.6.15-cp311-cp311-manylinux_2_17_s390x.manylinux2014_s390x.whl; vtracer-0.6.15-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl; vtracer-0.6.15-cp311-cp311-musllinux_1_2_aarch64.whl
Tags
More Graphics packages
Pillow adds image processing capabilities to…
permissive · top 100 on PyPI
fonttoolsfonttools manipulates font files in multiple…
permissive · top 1,000 on PyPI
matplotlib-inlineEnables matplotlib figures to display inline…
permissive · top 1,000 on PyPI
pymupdfPyMuPDF extracts, renders, converts, and…
agpl · top 1,000 on PyPI
pypdfium2pypdfium2 is a Python binding to PDFium that…
permissive · top 1,000 on PyPI
altairAltair is a declarative Python library for…
permissive · top 1,000 on PyPI
color-matchercolor-matcher transfers color characteristics…
copyleft · top 15,000 on PyPI
pictexPicTex generates high-quality PNG, JPEG, WebP,…
permissive · top 15,000 on PyPI
potracerConverts bitmap images to vector graphics by…
copyleft · top 15,000 on PyPI
resvg_pyConverts SVG documents to raster image bytes…
unclear · top 5,000 on PyPI
scourScour optimizes and cleans SVG files by…
permissive · top 15,000 on PyPI
vl-convert-pythonConverts Vega-Lite chart specifications to…
permissive · top 5,000 on PyPI
CairoSVGCairoSVG converts SVG files to PDF, EPS, PS,…
copyleft · top 5,000 on PyPI
napari-svgNapari-svg is a plugin that exports image data…
permissive · top 15,000 on PyPI
dash-svgProvides SVG component primitives (Svg, G,…
permissive · top 15,000 on PyPI
img2pdfConverts raster images to PDF without…
copyleft · top 5,000 on PyPI