process_sprite
Transforms external PNGs into clean sprites: removes backgrounds, auto-crops, pads to square, and splits sprite sheets for game asset use.
Instructions
Post-process an existing PNG image into a clean sprite. Handles background removal, auto-crop, square padding, and sprite sheet splitting. Use this for images from external sources that need processing.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| names | No | Names for split sprites (default: 0, 1, 2, ...) | |
| split | No | Split sprite sheet into individual sprites by detecting content boundaries | |
| square | No | Pad output to square (default: false) | |
| padding | No | Padding around content in pixels (default: 2) | |
| skipCrop | No | Skip auto-crop step | |
| inputPath | Yes | Path to the input PNG file | |
| threshold | No | Color detection threshold 0-255 (default: 20) | |
| outputPath | No | Output path. For split mode: prefix for frame files (e.g. "assets/snake" → "assets/snake-head.png") | |
| skipTransparent | No | Skip background removal step |