covecto-0.1.0 is not a library.
Covecto
Dual-engine image vectorization — pixel-exact for icons, smooth curves for art.
Why Covecto?
Most vectorizers are one-trick — good at photos or good at icons, never both. Covecto ships two engines and auto-selects the right one:
| Engine | Best For | Algorithm |
|---|---|---|
| PixelExact | Icons, pixel art, screenshots | Contiguous region flood-fill → boundary tracing → rectilinear SVG |
| Spline | Photos, illustrations, artwork | Color quantization → contour tracing → Bézier spline fitting |
| Auto (default) | Everything | Heuristic selection based on image characteristics |
Install
# Cargo
# Docker
# Pre-built binary (Linux/macOS/Windows)
# → See https://github.com/codecoradev/covecto/releases
Quick Start
# Auto-detect best engine
# Force pixel-exact (great for icons)
# Spline with photo preset
# Use a built-in profile (tunes multiple params)
# Batch: entire directory
# Batch: glob pattern
# Output formats
CLI Reference
Global
Vectorize
| Flag | Description | Default |
|---|---|---|
<INPUT> |
File, directory, or glob pattern | — |
-o, --output |
Output file (single) or directory (batch) | stdout |
--output-dir |
Output directory (batch alt) | — |
--output-template |
Filename template: {stem}, {name}, {ext} |
{stem}.{ext} |
-F, --format |
Output format: svg, pdf, eps |
svg |
-e, --engine |
Engine: auto, spline, pixel-exact |
auto |
--preset |
vtracer preset: bw, poster, photo |
— |
--profile |
Profile: icon, logo, photo, lineart |
— |
--color-precision |
Color quantization precision (1–32) | — |
--filter-speckle |
Filter speckle noise threshold | — |
--corner-threshold |
Corner detection (0–180) | — |
--splice-threshold |
Path splice threshold (0–100) | — |
--color-mode |
color or binary |
— |
--hierarchical |
stacked or cutout |
— |
--path-simplify |
spline, polygon, or none |
— |
--optimize |
Run SVG optimization | false |
--optimize-preset |
default, safe, or none |
default |
--multipass |
Multiple optimization passes | false |
-R, --recursive |
Recurse into subdirectories | false |
--json |
JSON output to stdout | false |
--json-pretty |
Pretty-printed JSON | false |
--no-progress |
Disable progress bar | false |
--dry-run |
Preview without processing | false |
Profiles
| Profile | Engine | Color | Use Case |
|---|---|---|---|
icon |
spline | 4 colors | Small icons, favicons |
logo |
spline | 8 colors, cutout | Logos with transparency |
photo |
spline | 10 colors, stacked | Photographs |
lineart |
spline | binary, cutout | Line drawings, sketches |
Serve
HTTP API
Start the server, then send requests:
# Vectorize
# Vectorize to PDF
# Optimize existing SVG
# Health check
# Metrics
Full API spec: openapi.yaml
Docker
# Pull
# Run with docker compose
# Or directly
# Vectorize a local file
Rust Library
use ;
use RgbaImage;
let img = open.unwrap.to_rgba8;
let request = new
.with_config;
let result = vectorize.unwrap;
println!;
Documentation
Full docs at docs.covecto.dev
License
MIT