Logo

Transforms raster images into expressive line-art SVG illustrations in under 1.5 seconds. Built with Rust for ultra-fast processing, featuring 4 specialized vectorization backends, GPU acceleration, and an artistic enhancement pipeline for hand-drawn aesthetics.

Problem

Converting images to SVGs typically requires desktop software, cloud uploads, or slow online tools. Privacy-conscious users have no fast, local option with artistic control.

Solution

Rust compiled to WebAssembly runs entirely in the browser: four vectorization algorithms (edge detection, stippling, centerline, superpixel) with SIMD optimization and Web Worker parallelism.

Outcome

Live at vec2art.com. Processes 2048x2048 images in under 1.5 seconds with less than 40MB memory. Zero data leaves the browser: ensuring complete client-side privacy.

Algorithm Pipeline
Algorithm Pipeline
Core Vectorizer
1/3
vectorizer.rs
#[wasm_bindgen]
pub fn vectorize(&self, image_data: &ImageData) -> Result<String, JsValue> {
log::info!("🖼️ Starting vectorization");
// Convert ImageData into an ImageBuffer
let width = image_data.width();
let height = image_data.height();
let data_vec: Vec<u8> = image_data.data().to_vec();
let img_buffer = ImageBuffer::from_raw(width, height, data_vec)
.ok_or_else(|| JsValue::from_str("Failed to create image buffer"))?;
// Build internal configuration
let (config, hand_drawn_cfg) = self.config_manager.build_internal()
.map_err(|e| JsValue::from_str(&format!("Configuration error: {}", e)))?;
// Perform vectorization using the core algorithm
let result = vectorize_trace_low_rgba(&img_buffer, &config, hand_drawn_cfg.as_ref())
.map_err(|e| JsValue::from_str(&format!("Vectorization failed: {}", e)))?;
log::info!("✅ Generated {} bytes of SVG", result.len());
Ok(result)
}
Technology Stack
Rust
Rust
SvelteKit
SvelteKit
Vercel
Vercel
Formspark
Formspark
WebAssembly
WebAssembly
Turnstile
Turnstile
TypeScript
TypeScript