mirror of
https://github.com/visioncortex/vtracer.git
synced 2026-09-27 06:21:23 -07:00
A splice slice with very uneven point spacing — a few-pixel jog followed by a long straight leg, which the walker produces around thin strands — was fitted by a single cubic that interpolated every sample exactly while swinging up to ~30 px sideways between them (the fit error was only measured at the samples). On the Cityscape sample at -p 8 -g 28 the maroon strand's wall bulged across its 2 px gap; a long-standing defect present in pre-1.0 vtracer as well. The fix lives in visioncortex 0.9.1 (densify slices with witness points, keep the full multi-cubic chain): the mosaic's shared-boundary spline fitter switches to the new fit_points_with_beziers so open segments get the same treatment as stacked mode. Verified against the exact pixel-mode rasterization — the fitted wall now matches it at every probed row — with identical path counts and only +3 cubics across the whole Cityscape output. All three workspaces (core, py, nodejs) carry a [patch.crates-io] entry pointing at the local visioncortex until 0.9.1 is published. Regression coverage for spline handle anchoring; re-bless goldens tests/spline_fit.rs traces the real reproduction (the Cityscape sample at color precision 8 / gradient step 28, whose maroon region contains a 1 px by 330 px strand) through both compositors and asserts the property the sparse-slice bug violated: every cubic's control points stay within its shape's on-curve bounding box plus a 15 px allowance. The ballooning fit put a handle 25 px outside the whole shape, so the margin is decisive in both directions. The sample photo is decoded via a test-only image dev-dependency. The synthetic goldens are re-blessed: the fitting fix shifts fixture coordinates slightly (witness points refine fits even on clean shapes); the old files still passed the render-diff, so the visual change is sub-tolerance, but goldens should byte-match intentional behavior. Depend on published visioncortex 0.9.1; drop local path patches
27 lines
892 B
TOML
27 lines
892 B
TOML
[package]
|
|
name = "vtracer"
|
|
description = "A vectorization framework that converts raster images into vector graphics: pluggable frontends, curve fitters, color fitting, and output optimization."
|
|
version.workspace = true
|
|
authors.workspace = true
|
|
edition.workspace = true
|
|
license.workspace = true
|
|
homepage.workspace = true
|
|
repository.workspace = true
|
|
categories = ["graphics", "computer-vision"]
|
|
keywords = ["svg", "vectorization", "computer-graphics"]
|
|
readme = "../../README.md"
|
|
|
|
[lib]
|
|
name = "vtracer"
|
|
path = "src/lib.rs"
|
|
|
|
[dependencies]
|
|
visioncortex.workspace = true
|
|
|
|
[dev-dependencies]
|
|
# Rasterize-and-diff equivalence tests (stacked vs mosaic). Test-only; not
|
|
# compiled for wasm targets, so the library stays wasm-safe.
|
|
resvg = "0.45"
|
|
# Decode the sample photo for the spline-fitting regression test. Test-only.
|
|
image = { version = "0.25", default-features = false, features = ["jpeg"] }
|