draw_image
Composite or overwrite PNG images into an Aseprite layer or frame at specific coordinates, with optional crop, scaling, and blend/copy/replace modes.
Instructions
Draws an image file (PNG, etc.) into a layer/frame at (x,y). mode 'blend' composites over existing pixels, 'copy' overwrites the area, 'replace' swaps the whole cel image. Optional source crop, scale or target size.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| x | No | ||
| y | No | ||
| file | Yes | ||
| mode | No | ||
| save | No | Batch mode: write changes back to the sprite file (default true) | |
| frame | No | 1-based frame number. Defaults to the active frame (or 1). | |
| layer | No | Layer name, 'Group/Child' path, or 1-based index from get_sprite_info. Defaults to the active layer. | |
| scale | No | ||
| width | No | ||
| height | No | ||
| sprite | No | File path, open tab title, or sprite id. Defaults to the active sprite (live). Batch mode needs a file path. | |
| backend | No | auto (default): live Aseprite if connected, else headless batch | |
| opacity | No | ||
| blendMode | No | ||
| sourceRect | No |