# Png2svg

> >

- **Type:** Skill
- **Install:** `agentstack add skill-owenmorgan-claude-skills-png2svg`
- **Verified:** Yes — security-reviewed for prompt injection and unsafe behavior
- **Seller:** [owenmorgan](https://agentstack.voostack.com/s/owenmorgan)
- **Installs:** 0
- **Category:** [Agent Skills](https://agentstack.voostack.com/c/agent-skills)
- **Latest version:** 0.1.0
- **License:** MIT
- **Upstream author:** [owenmorgan](https://github.com/owenmorgan)
- **Source:** https://github.com/owenmorgan/claude-skills/tree/main/skills/png2svg

## Install

```sh
agentstack add skill-owenmorgan-claude-skills-png2svg
```

Requires the [AgentStack CLI](https://agentstack.voostack.com/docs/cli). Works with Claude Code, Cursor, and any MCP-compatible agent.

## About

# png2svg — Raster to SVG Conversion

Convert raster images (PNG, JPEG, BMP, TIFF, WebP) to high-fidelity SVG.

Auto-detects the best tracing engine:
- **potrace** for monochrome images (logos, icons, line art) — smooth bezier curves, tiny files
- **vtracer** for full-colour images (illustrations, photos) — preserves colour layers

## Setup check

Before first use, verify dependencies are installed:

```bash
python3 -c "from PIL import Image; import numpy; print('ok')" && python3 -c "import vtracer; print('vtracer ok')" && potrace --version
```

If anything is missing:
```bash
pip install Pillow numpy vtracer && brew install potrace
```

## Script location

The conversion script is at `${CLAUDE_SKILL_DIR}/scripts/png2svg.py`.

## Workflow

1. **Identify the image(s)** — confirm the file path(s) with the user. If they mention a directory, use Glob to find image files (`**/*.png`, `**/*.jpg`).

2. **Determine output location** — default is alongside the input file with `.svg` extension. Ask if unclear.

3. **Run the conversion:**

```bash
python3 "${CLAUDE_SKILL_DIR}/scripts/png2svg.py"  [options]
```

4. **Report the result** — show the engine used, file sizes, and output path.

## Options

| Flag | Description | Default |
|------|-------------|---------|
| `-o, --output` | Output file or directory | Same dir as input |
| `-e, --engine` | `auto`, `potrace`, or `vtracer` | `auto` |
| `-p, --preset` | vtracer quality: `max`, `high`, `fast` | `max` |
| `-c, --colour` | Fill colour for potrace (hex) | Auto-detected |
| `--alphamax` | Corner smoothness: 0=sharp, 1.334=smooth | `1.0` |
| `--opttolerance` | Curve precision: lower=more precise | `0.1` |
| `--turdsize` | Speckle suppression threshold (px) | `2` |

## Examples

```bash
# Auto-detect engine
python3 "${CLAUDE_SKILL_DIR}/scripts/png2svg.py" logo.png

# Force potrace with custom colour
python3 "${CLAUDE_SKILL_DIR}/scripts/png2svg.py" logo.png -e potrace -c '#1a1a1a'

# Batch convert
python3 "${CLAUDE_SKILL_DIR}/scripts/png2svg.py" /path/to/*.png -o /path/to/svgs/

# Sharper corners on a logo
python3 "${CLAUDE_SKILL_DIR}/scripts/png2svg.py" icon.png --alphamax 0.5

# Force vtracer for a colour illustration
python3 "${CLAUDE_SKILL_DIR}/scripts/png2svg.py" artwork.png -e vtracer -p max
```

## Troubleshooting

- **SVG looks jagged** — image was probably traced with vtracer. Try `-e potrace`
- **SVG is too large** — use `-p fast` with vtracer, or increase `--turdsize` with potrace
- **Wrong colour** — use `-c '#hex'` to override the auto-detected fill colour
- **potrace not found** — install with `brew install potrace` (macOS) or `apt install potrace` (Linux)

## Source & license

This open-source skill is cataloged on AgentStack and links to its original source — we do not rehost the code.

- **Author:** [owenmorgan](https://github.com/owenmorgan)
- **Source:** [owenmorgan/claude-skills](https://github.com/owenmorgan/claude-skills)
- **License:** MIT

Install and usage instructions live in the source repository linked above.

## Pricing

- **Free** — Free

## Security capabilities

Automated source analysis of v0.1.0 — what this tool can access:

- **Network access:** no
- **Filesystem access:** no
- **Shell / process execution:** no
- **Environment & secrets:** no
- **Dynamic code execution:** no

*"Yes" means the capability is present in the source — more access means more to trust, not that it is unsafe.*


## Versions

- **0.1.0** — security scan: passed — Imported from the upstream source.

## Links

- Listing page: https://agentstack.voostack.com/l/skill-owenmorgan-claude-skills-png2svg
- Seller: https://agentstack.voostack.com/s/owenmorgan
- Browse the marketplace: https://agentstack.voostack.com/browse

---
Listed on AgentStack — the marketplace for AI agent skills and MCP servers. Every listing is security-reviewed. Creators keep 70%.
