skillfed

vtracer

Python bindings for the Rust Vtracer raster-to-vector library

vtracer v0.6.15 298.9K downloads/30d#7,866 on PyPI
Permissive license MIT Active released

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 vtracer

uv

uv add vtracer

poetry

poetry add vtracer

Installing 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

Programming Language :: Python :: Implementation :: CPythonProgramming Language :: Python :: Implementation :: PyPyProgramming Language :: Rust

Tags

raster to vector conversionimage to svg convertertrace image to vectorrasterize to vectorizeimage vectorization pythonconvert jpg png to svgcurve tracing image processing
image-processingvectorizationrust-binding

More Graphics packages