Loading...
Loading...
Compare original and translation side by side
@neplex/vectorizer@neplex/vectorizerYYYY-MM-DDTHH-mm-ss-SSSZ<workspace>/svg-output/
└── <timestamp>/ # e.g., 2026-01-27T02-13-38-811Z
├── reference.png # Generated reference image
├── icon.svg # Color SVG output
└── icon_preview.png # Preview for comparisonYYYY-MM-DDTHH-mm-ss-SSSZ<workspace>/svg-output/
└── <timestamp>/ # 示例:2026-01-27T02-13-38-811Z
├── reference.png # 生成的参考图像
├── icon.svg # 彩色SVG输出文件
└── icon_preview.png # 用于对比的预览图cd <workspace>
npm init -y
npm install @neplex/vectorizer sharpcd <workspace>
npm init -y
npm install @neplex/vectorizer sharpgenerate_imagesvg-outputundefinedgenerate_imagesvg-outputundefined
**Prompt template:**undefined
**提示模板:**undefinednode .agent/skills/svg-icon-maker/script/convert-template.js <input-file> [output-dir]undefinednode .agent/skills/svg-icon-maker/script/convert-template.js <input-file> [output-dir]undefined
**Key Features:**
- **4-Corner Flood Fill**: Removes background starting from all corners to handle split backgrounds.
- **Inner Detail Protection**: Preserves white/light details inside the subject (e.g., eyes).
- **Auto-Threshold**: Adapts to the specific background color found at the corners.
- **Timestamped Output**: Automatically creates folders with format `YYYY-MM-DDTHH-mm-ss-SSSZ`.
**核心特性:**
- **四角填充去背景**:从四个角落开始移除背景,处理分割式背景。
- **内部细节保护**:保留主体内部的白色/浅色细节(如眼睛)。
- **自动阈值**:适配在角落检测到的特定背景颜色。
- **时间戳输出**:自动创建格式为`YYYY-MM-DDTHH-mm-ss-SSSZ`的文件夹。ls -la <workspace>/svg-output/view_filereference.pngicon_preview.pngls -la <workspace>/svg-output/view_filereference.pngicon_preview.png| Parameter | Default | Description |
|---|---|---|
| Color | |
| 8 | 1-8, higher = more colors (8 = max fidelity) |
| 8 | Color layer threshold (lower = less merging) |
| 4 | Remove noise pixels (lower = more detail) |
| Spline | |
| 60 | Corner detection angle |
| 45 | Spline angle threshold |
| 参数 | 默认值 | 说明 |
|---|---|---|
| Color | |
| 8 | 1-8,数值越高颜色越丰富(8=最高保真度) |
| 8 | 颜色层阈值(数值越低,合并越少) |
| 4 | 移除噪点像素(数值越低,保留细节越多) |
| Spline | |
| 60 | 角点检测角度 |
| 45 | 样条曲线角度阈值 |