How netkaruma/image-svg-vectorizer works
This Python library converts raster images into color-simplified SVGs, either one image at a time or in a directory batch. The principal workflow is image processing and color reduction, contour extraction, then SVG export; optional outputs include comparison previews and processing statistics. The README documents transparency handling, automatic color selection, and acceleration as processing capabilities. Some implementation details are omitted from the excerpts, so the graph shows only supported wiring and treats those capabilities as part of the vectorizer rather than inventing separate components.
Main entry points: vectorizer.py Image vectorizer · batch_processor.py Directory processor · svg_exporter.py SVG and stats exporter · color_processor.py Color contours
Components 15
Public workflows
- Single-image API
image_svg_vectorizer/vectorizer.py - Batch API
image_svg_vectorizer/batch_processor.py - Directory processor
image_svg_vectorizer/batch_processor.py
Image processing
- Image vectorizer
image_svg_vectorizer/vectorizer.py - Color simplification
image_svg_vectorizer/vectorizer.py - Color contours
image_svg_vectorizer/color_processor.py
Output generation
- SVG and stats exporter
image_svg_vectorizer/svg_exporter.py - Preview generation
image_svg_vectorizer/vectorizer.py
Shared data
- Processing results
image_svg_vectorizer/utils.py - Color and contour data
image_svg_vectorizer/utils.py
Other components
- Library user
- Raster images
- SVG output
- Preview image
- Stats JSON
Connections 21
- Library user → Single-image API: invokes
- Library user → Batch API: invokes
- Batch API → Directory processor: creates
- Directory processor → Image vectorizer: processes images
- Raster images → Image vectorizer: reads
- Single-image API → Image vectorizer: processes image
- Image vectorizer → Color simplification: simplifies colors
- Image vectorizer → Color contours: extracts contours
- Color contours → Color and contour data: produces
- Image vectorizer → Processing results: assembles
- Color and contour data → Processing results: included in
- Image vectorizer → SVG and stats exporter: exports SVG
- SVG and stats exporter → Color contours: converts contours
- SVG and stats exporter → SVG output: writes
- Image vectorizer → Preview generation: creates preview
- Preview generation → Preview image: writes
- Image vectorizer → SVG and stats exporter: exports statistics
- SVG and stats exporter → Stats JSON: writes
- Directory processor → SVG output: requests export
- Directory processor → Preview image: requests preview
- Directory processor → Stats JSON: requests statistics