Convert a local image into a GB Studio sprite
convert_image_to_spriteConverts a local PNG or JPG into a 4-color DMG-quantised GB Studio sprite sheet. Handles fixed frames or multi-directional animations with automatic quality verification.
Instructions
Read a local PNG/JPG and convert it to a 4-colour DMG-quantised GB Studio sprite. For animationType=fixed the image is treated as one frame. For animationType=multi/multi_movement the input MUST already be a sprite sheet (3 frames wide for multi, 6 frames wide for multi_movement) — single-frame inputs cannot be expanded to multiple directions. After quantisation a heuristic quality check runs: degenerate outputs (near-empty, single-shade, low-detail) refuse to write unless force: true. No API key required.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| name | Yes | Display name; seeds the slug. | |
| force | No | Skip the post-quantisation quality check and write the sprite even if it looks degenerate. | |
| inputPath | Yes | Absolute path, or relative to the project root, of the source PNG/JPG. | |
| animationType | Yes |