矢量化图像

KyleMit2026-10-26查看 983复制 99

通过 Vectorizer.AI API 将位图(PNG/JPG/WebP/GIF/BMP)描摹为干净的矢量图——SVG、PDF、EPS、DXF 或 PNG——并由免费测试模式守护额度预算。当被要求矢量化、描摹或将栅格图像转换为 SVG/矢量图,将涂色轮廓或徽标转换为可缩放路径,或调用 Vectorizer.AI 时使用。涵盖认证、每个 API 参数、输出选项、错误以及额度成本模型。

Download (.md)

📘如何使用这个技能

  1. 1
    复制技能内容·点击上方「Copy SKILL.md」复制全部内容,或 Download 下载到本地
  2. 2
    打开你的 AI 客户端·支持 Claude Code、Trae、Cursor、ChatGPT、DeepSeek、Kimi 等任意 AI 助手
  3. 3
    粘贴为系统提示/知识文件·Claude Code:放入 .claude/skills/ 目录;普通对话:作为首条消息发送并说「请严格按这份技能文档执行」
  4. 4
    直接提出你的需求·AI 会按技能定义的工作流、格式和约束来处理,无需再解释背景

💡 提示:技能生效后,每次对话只需一句需求,AI 会按 SKILL.md 的流程执行。

SKILL.md2967 chars
---
name: vectorize-image
description: Trace a bitmap (PNG/JPG/WebP/GIF/BMP) to clean vector art — SVG, PDF, EPS, DXF, or PNG — through the Vectorizer.AI API, with the credit budget guarded by a free test mode. Use when asked to vectorize, trace, or convert a raster image to SVG/vector, to turn a coloring outline or logo into scalable paths, or to call Vectorizer.AI at all. Covers auth, every API parameter, output options, errors, and the credit-cost model.
---

# Vectorize an image (Vectorizer.AI)

The tool lives in **`tools/vectorize/`** — a driver plus the inlined Vectorizer.AI documentation.
This skill is only the entry point; read the runbook before calling anything.

**Money is involved.** The account is a metered **50-credit** plan and a production trace costs **1
credit**, non-refundable. The driver defaults to Vectorizer.AI's **free** watermarked test mode,
which supports every parameter — so iterate there and pass `--production` exactly once, for the
keeper.

```bash
npm run vectorize -- <input> --out vectorized/out.svg   # free test mode
npm run vectorize -- --help                             # flags
npm run vectorize -- --account                          # remaining credits (free)
```

`<input>` is a file path, an `http(s)` URL, or `token:<image-token>`. Output defaults to the
gitignored `vectorized/`.

| Read this                                                                                   | For                                                                                                        |
| ------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------- |
| [`tools/vectorize/README.md`](../../../tools/vectorize/README.md)                           | **Start here.** Credentials, the credit rules, the flat-icon → transparent-SVG recipe, flag table, gotchas |
| [`tools/vectorize/docs/api.md`](../../../tools/vectorize/docs/api.md)                       | Every endpoint, parameter, response header, pricing row, rate-limit and timeout rule                       |
| [`tools/vectorize/docs/output-options.md`](../../../tools/vectorize/docs/output-options.md) | What each output option means — draw style, stacking, grouping, curves, gap filler                         |
| [`tools/vectorize/docs/errors.md`](../../../tools/vectorize/docs/errors.md)                 | Every HTTP status and error code, grouped by what to do about each                                         |

Three things the runbook will tell you that are easy to get wrong: results have **no centerline
tracing** (strokes come back as narrow filled shapes, never a single stroked path); the test-mode
watermark **consumes `processing.max_colors` slots**, so discover colors with `max_colors=0`; and
dropping a white background while keeping a near-white element is a **tolerance** calculation, not a
flag.
来源:skillsdirectory

评论0

登录后参与评论

还没有评论,来抢沙发吧