mirror of
https://github.com/visioncortex/vtracer.git
synced 2026-09-12 07:06:03 -07:00
f76aed78b2
New crates/vtracer-py (pyo3 + maturin, abi3) wrapping the vtracer framework. Rather than a thin CLI-style wrapper, it exposes a mutable `Config` class with named properties and `bw`/`poster`/`photo` preset constructors, plus three input paths — `convert_file`, `convert_bytes` (encoded image, optional format), and `convert_pixels` (raw RGBA8) — available as `Config` methods and module-level functions. Palette is a list of `#rrggbb` strings; bad inputs raise ValueError. The core crate stays pure: image decoding lives here. The crate is excluded from the cargo workspace (pyo3 extension-module cdylibs don't link libpython, which breaks `cargo test` at the root) and is built with maturin. Ships a vtracer.pyi type stub. README updated.
27 lines
833 B
TOML
27 lines
833 B
TOML
[build-system]
|
|
requires = ["maturin>=1.5,<2.0"]
|
|
build-backend = "maturin"
|
|
|
|
[project]
|
|
name = "vtracer"
|
|
description = "Raster to vector graphics converter — Python bindings for the vtracer framework."
|
|
requires-python = ">=3.8"
|
|
license = { text = "MIT OR Apache-2.0" }
|
|
authors = [{ name = "Chris Tsang", email = "tyt2y7@gmail.com" }]
|
|
keywords = ["svg", "vectorization", "raster", "computer-graphics"]
|
|
classifiers = [
|
|
"Programming Language :: Rust",
|
|
"Programming Language :: Python :: 3",
|
|
"Topic :: Multimedia :: Graphics",
|
|
]
|
|
dynamic = ["version"]
|
|
|
|
[project.urls]
|
|
Homepage = "http://www.visioncortex.org/vtracer"
|
|
Repository = "https://github.com/visioncortex/vtracer/"
|
|
|
|
[tool.maturin]
|
|
# Pure-Rust extension module; the compiled library is imported as `vtracer`.
|
|
module-name = "vtracer"
|
|
features = ["pyo3/extension-module"]
|