vectorize
Installation
SKILL.md
Vectorize
Three paths
1. Recraft /vectorize (hosted, highest quality)
Input: any raster. Output: clean SVG, typically 20–100 paths for a mark, 200–500 for an illustration. Commercial tier only.
const svg = await recraft.vectorize({ image: pngBuffer });
2. vtracer (local, multi-color polygon)
- Rust binary;
npm install vtracerfor the Node wrapper. - Modes:
polygon(recommended for logos),spline(smoother curves),pixel(blocky). - Color count controlled upstream via K-means quantization before vectorization.