diff --git a/README.md b/README.md index 0f2fec3..8626ab6 100644 --- a/README.md +++ b/README.md @@ -84,15 +84,14 @@ svgsmith convert path/to/image.png --out out.svg --report json ## Gallery -Each pair is the original raster (left) and the svgsmith SVG output (right), rendered at the -same size. Fixtures are self-generated (see `tests/corpus/`). +Each pair is the original raster (left) and the actual svgsmith SVG output (right), +rendered at the same size. -| | Original | svgsmith SVG | +| | Original (PNG) | svgsmith (SVG) | |---|---|---| -| **Logo** (`--mode binary`) | | | -| **Icon** (`--mode binary`) | | | -| **Illustration** (`--mode color`) | | | -| **Pixel art** (`--mode pixel`) | | | +| **Mascot** · `--detail high` | | | +| **Portrait** · `--detail high` | | | +| **Painterly** · `--detail clean` | | | ## Usage @@ -121,11 +120,30 @@ svgsmith convert input.png \ | `--out PATH` | `.svg` | Output SVG path. | | `--report {off,json}` | `off` | Print a JSON report to stdout (the only thing on stdout). | -> **Composable for agents.** svgsmith is meant to be driven by an AI agent that maps a -> user's intent to flags. *"Detailed character on a clean flat background"* → -> `--detail high --solid-background`; *"poster-style, minimal"* → `--detail poster`; -> *"crisp logo"* → `--mode binary`; *"keep the raw look"* → `--no-smooth`. The -> [`vectorize` skill](skills/vectorize/SKILL.md) encodes this mapping. +## For AI agents — mapping a user's request to flags + +svgsmith is meant to be driven by an agent: the user describes what they want in plain +language, and the agent translates that into flags. The flags **compose** — pick a mode +(or let `auto` decide), then add refinements for what the user asked for. + +| If the user says… | The agent calls svgsmith with… | +|---|---| +| "vectorize / trace this", nothing specific | *(defaults)* `--mode auto` | +| "clean logo", "crisp icon", black & white line art | `--mode binary --quality 0.95` | +| "pixel art", "sprite" | `--mode pixel` | +| "keep every detail / texture / shading" | `--detail high` | +| "make it cleaner / tidier", "less noise" | `--detail clean` | +| "poster / flat / bold graphic", "minimalist" | `--detail poster` | +| "put it on a clean / solid background", "remove the background", "just the subject" | `--solid-background` | +| "detailed character on a plain background" | `--detail high --solid-background` | +| "even / consistent outline" (art that already has a dark outline) | `--uniform-outline` | +| "keep the rough / hand-drawn look", "don't smooth" | `--no-smooth` | +| "give it back as a PNG", "render / preview it" | `svgsmith rasterize out.svg` | + +Always pass `--report json` so the agent can read the result (mode used, similarity, +warnings) and decide whether to accept, retry with a different flag, or tell the user +why (e.g. a photo warning). The bundled [`vectorize` skill](skills/vectorize/SKILL.md) +encodes this exact mapping and the accept/retry logic. ### Rasterize (SVG → PNG) diff --git a/docs/gallery/bee_after.png b/docs/gallery/bee_after.png new file mode 100644 index 0000000..0306085 Binary files /dev/null and b/docs/gallery/bee_after.png differ diff --git a/docs/gallery/bee_before.png b/docs/gallery/bee_before.png new file mode 100644 index 0000000..a929733 Binary files /dev/null and b/docs/gallery/bee_before.png differ diff --git a/docs/gallery/icon_in.png b/docs/gallery/icon_in.png deleted file mode 100644 index 258cdda..0000000 Binary files a/docs/gallery/icon_in.png and /dev/null differ diff --git a/docs/gallery/icon_out.png b/docs/gallery/icon_out.png deleted file mode 100644 index 351dca2..0000000 Binary files a/docs/gallery/icon_out.png and /dev/null differ diff --git a/docs/gallery/illustration_in.png b/docs/gallery/illustration_in.png deleted file mode 100644 index 1bc7bc7..0000000 Binary files a/docs/gallery/illustration_in.png and /dev/null differ diff --git a/docs/gallery/illustration_out.png b/docs/gallery/illustration_out.png deleted file mode 100644 index 9162b55..0000000 Binary files a/docs/gallery/illustration_out.png and /dev/null differ diff --git a/docs/gallery/logo_in.png b/docs/gallery/logo_in.png deleted file mode 100644 index 9d95916..0000000 Binary files a/docs/gallery/logo_in.png and /dev/null differ diff --git a/docs/gallery/logo_out.png b/docs/gallery/logo_out.png deleted file mode 100644 index 605ccda..0000000 Binary files a/docs/gallery/logo_out.png and /dev/null differ diff --git a/docs/gallery/mascot_after.png b/docs/gallery/mascot_after.png new file mode 100644 index 0000000..4115b7b Binary files /dev/null and b/docs/gallery/mascot_after.png differ diff --git a/docs/gallery/mascot_before.png b/docs/gallery/mascot_before.png new file mode 100644 index 0000000..c8211ae Binary files /dev/null and b/docs/gallery/mascot_before.png differ diff --git a/docs/gallery/pixel_in.png b/docs/gallery/pixel_in.png deleted file mode 100644 index 9ef7996..0000000 Binary files a/docs/gallery/pixel_in.png and /dev/null differ diff --git a/docs/gallery/pixel_out.png b/docs/gallery/pixel_out.png deleted file mode 100644 index 5bc0c35..0000000 Binary files a/docs/gallery/pixel_out.png and /dev/null differ diff --git a/docs/gallery/portrait_after.png b/docs/gallery/portrait_after.png new file mode 100644 index 0000000..c5f4221 Binary files /dev/null and b/docs/gallery/portrait_after.png differ diff --git a/docs/gallery/portrait_before.png b/docs/gallery/portrait_before.png new file mode 100644 index 0000000..169764e Binary files /dev/null and b/docs/gallery/portrait_before.png differ