← ClaudeAtlas

ss-png-to-svglisted

Convert PNG images to smooth, scalable SVG vector files using potrace tracing. Supports multi-color PNGs (logos, icons, illustrations) by extracting dominant colors and tracing each color layer separately, then compositing into a clean SVG. Also handles single-color images and lets users override the fill color. Use this skill whenever the user wants to: convert a PNG to SVG, trace a bitmap, vectorize an image or logo, turn a raster image into vectors, create an SVG from a PNG/JPEG/bitmap, or anything involving bitmap-to-vector conversion. Also trigger when the user mentions "potrace", "image tracing", or asks to make an image scalable.
rajnandan1/such-skills · ★ 2 · Data & Documents · score 75
Install: claude install-skill rajnandan1/such-skills
# PNG to SVG Converter Convert raster PNG images into smooth, clean SVG vector files. The skill uses ImageMagick for image preprocessing and potrace for bezier curve tracing, producing SVGs with smooth paths that scale to any size. ## Prerequisites Two command-line tools are needed. If either is missing, install them: ```bash brew install imagemagick potrace ``` ## How to use There's a bundled script at `scripts/png2svg.sh` that handles the full pipeline. Run it directly: ```bash bash "${CLAUDE_SKILL_DIR}/scripts/png2svg.sh" <input.png> [output.svg] [OPTIONS] ``` ### Options | Flag | Description | Default | |------|-------------|---------| | `--single-color` | Force single-color trace instead of multi-color | off (multi-color) | | `--color "#hex"` | Override the fill color | auto-detected | | `--threshold N` | Grayscale threshold 0-100 (higher = more detail) | 50 | | `--smoothness N` | Curve smoothness 0-1.334 (higher = smoother) | 1.334 | ### Examples **Simple single-color logo:** ```bash bash "${CLAUDE_SKILL_DIR}/scripts/png2svg.sh" logo.png logo.svg --single-color ``` **Multi-color illustration (default):** ```bash bash "${CLAUDE_SKILL_DIR}/scripts/png2svg.sh" artwork.png artwork.svg ``` **Override color:** ```bash bash "${CLAUDE_SKILL_DIR}/scripts/png2svg.sh" icon.png icon.svg --color "#FF5733" ``` **Adjust for detailed images:** ```bash bash "${CLAUDE_SKILL_DIR}/scripts/png2svg.sh" detailed.png --threshold 60 --smoothness 1.0 ``` ## What the script does 1