Registry / data / vtracer

vtracer

JSON →
library0.6.15pypypi✓ verified 80d ago

Python bindings for the Rust Vtracer raster-to-vector library. Converts bitmap images (PNG, JPG, etc.) to SVG vector graphics with configurable color precision, gradient steps, and hierarchical clustering. Current version 0.6.15, requires Python >=3.7. Active development but infrequent releases.

pip install vtracer
INSTALL
IMPORT
SIG · VTRACER
V
vtracer
datapythonv0.6.15
Install
1.6s avg
Import
Disk
19MB
Pass rate
10/ 10
Env Coverage10 / 10
glibc
3.93.13
musl
3.93.13
Install & Compatibility
Where this runs
tested against v0.6.15 · pip install
no network on importno background threads
Install × environment matrix
Each cell = how many times install + import succeeded across repeated harness runs. Partial = flaky.
glibc = Debian/Ubuntu slim · musl = Alpine Linux
musl
py 3.103.95 runs
installs and imports cleanly · install 0.0s · import 0.000s · 20.8MB
glibc
py 3.103.95 runs
installs and imports cleanly · install 1.6s · import 0.000s · 21MB
19MB installed
● package 19MB
Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

convert_image_to_svg_py
from vtracer import convert_image_to_svg_py
from vtracer import convert_image_to_svg_path
convert_pixels_to_svg
from vtracer import convert_pixels_to_svg
convert_raw_image_to_svg
from vtracer import convert_raw_image_to_svg

Converts a raster image to SVG with customizable vectorization parameters.

from vtracer import convert_image_to_svg_path # Convert a PNG to SVG with default settings input_path = 'input.png' output_path = 'output.svg' convert_image_to_svg_path( input_path, output_path, colormode='color', # 'color' or 'binary' hierarchical='stacked', # 'stacked' or 'cutout' mode='spline', # 'spline' or 'polygon' filter_speckle=4, # Remove speckles smaller than this color_precision=6, # Color quantization bits (0-8) layer_difference=16, # Merge layers if color diff ≤ this corner_threshold=60, # Corner detection angle threshold length_threshold=4.0, # Curve approximation threshold max_iterations=10, # Max iterations per path splice_threshold=45, # Splice detection angle path_precision=3 # Path simplification (0=lossless, 3=high quality) ) print(f'Converted {input_path} to {output_path}')
Debug
Known issues
gotchacolormode='binary' expects a grayscale image; color images will produce unexpected results. Use colormode='color' for color images.
fix
Ensure input is grayscale when using colormode='binary', or convert to grayscale first with Pillow.
affects: all
gotchaThe filter_speckle parameter only applies to binary mode. In color mode it is ignored.
fix
Use hierarchical parameters (layer_difference) to control noise in color mode.
affects: all
breakingBefore 0.5.0, the function was named 'convert_image' and had a different parameter set. The API was completely rewritten for 0.6.x.
fix
Update imports to use 'convert_image_to_svg_path' or 'convert_image_to_svg' and adjust parameters per current docs.
affects: <0.5.0
gotchaThe library is a Python binding to a Rust binary; the Rust binary must be compatible with the Python wheel. Some platforms (e.g., ARM64 Linux) may not have precompiled wheels and will build from source via maturin, which requires Rust toolchain.
fix
Install Rust via rustup if building from source fails. Alternatively, use a supported platform or check for prebuilt wheels on PyPI.
affects: all
Upgrade
Version history
0.6.15latest on PyPI · released Mar 23, 2026
Audit
Dependencies
numpyrequiredUsed internally for image processing, installed automatically.
pillowrequiredUsed for reading image files (JPEG, PNG etc.), installed automatically.
Agent activity
52 hits · last 30 days
node
46
Amazon
1
OpenAI (training)
1
Resources
vtracer — pip install vtracer · libregistry