Kokon
一款免费的本地化方案,可替代 Nano Banana 和 Generative Fill。涂抹区域,输入更改,由您自己的 GPU 进行编辑。提供 Windows、Mac 和 Linux 的单一安装程序。
AI 翻译
尚未收集仓库信息。
尚未检测到更新。GitHub 发布版本后会显示在这里。
Vectors - SVG Tool
翻译准备中
正在加载完整 README。
查看完整 README ↗Topics: svg, vectorization, rust, cli, wasm, mcp
Live demo: https://hieudoanm.github.io/vectors/
Turn PNG and JPEG images into clean SVG paths — and rasterize SVG back to PNG at any size — entirely offline.
vectors is a classical raster-to-vector tracer written from scratch in Rust. It quantizes an image into a palette, segments pixels into regions, walks their boundaries, simplifies the result, fits Bézier curves, and emits SVG. No machine-learning models, no network calls, no service dependency — and the same input always produces byte-identical output.
The tracer ships as a CLI, an HTTP API, an MCP server, a Rust library (compiled to WebAssembly for the web app), and a Next.js landing page with an in-browser converter.
Turning a raster logo back into usable vector paths is usually either an online upload form, a heavyweight design tool, or a black box that changes its output between runs. A practical tracer needs to:
path elements with fill, not an embedded bitmap.vectors is built around those constraints.
vectors runs one linear pipeline — raster → preprocess → segment → contour → simplify → Bézier → vector model → SVG — where each stage consumes the previous stage's type and knows nothing about how the next one is rendered. The tracer is deterministic by construction (no RNG, no hash-order dependence), and is measured by rasterizing its own SVG output with an independent renderer rather than by eyeballing the paths.
The inverse direction, SVG → PNG, parses the document with resvg, draws it straight into a straight-alpha buffer, and encodes it with image. Width and height are explicit flags, so the same binary can produce a 512 px icon or a 4096 px comparison raster.
fill-rule="evenodd".--debug-dir writes the quantized image, regions, curves, and curve SVG so you can see which stage went wrong.vectors serve exposes /health, /info, and POST /vectors (multipart or URL-safe base64), with per-request overrides.vectors mcp serve speaks newline-delimited JSON-RPC on stdio and advertises a vectors_trace tool for agent clients.trace, to_svg, Raster, TraceConfig, and SvgOptions; VectorImage is SVG-independent so another serializer is additive.--width alone preserves the aspect ratio; --width and --height together set the exact grid.--background '#ffffff' to composite an opaque backdrop.resvg comes from the module's raster feature, not from a system package.--features eval adds eval, baseline, golden, and sweep subcommands that rasterize the emitted SVG, compare it to the source, and score MAE, PSNR, SSIM, edge agreement, primitives, and bytes.colors, threshold, tolerances, and area limits across the golden suite.以上为 README 的开头部分。其余内容请阅读原文。 查看完整 README ↗