copy_region
Copy a rectangular pixel region to a different position, layer, or frame in an Aseprite file, preserving transparent pixels.
Instructions
Copy a rectangular region of pixels to another position, layer, or frame.
Coordinates are sprite-global. Fully transparent source pixels do not overwrite destination pixels. The destination cel is created when missing.
Args: filename: Aseprite file to modify layer_name: Source layer frame_index: Source frame index starting at 1 x: Left edge of the source region y: Top edge of the source region width: Region width height: Region height dest_x: Left edge of the destination dest_y: Top edge of the destination target_layer_name: Destination layer (default: same as source) target_frame_index: Destination frame (default: same as source)
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"filename": "<filename>",
"layer_name": "<layer_name>",
"frame_index": "<frame_index>",
"x": "<x>",
"y": "<y>",
"width": "<width>",
"height": "<height>",
"dest_x": "<dest_x>",
"dest_y": "<dest_y>"
},
"name": "copy_region"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| filename | Yes | ||
| layer_name | Yes | ||
| frame_index | Yes | ||
| x | Yes | ||
| y | Yes | ||
| width | Yes | ||
| height | Yes | ||
| dest_x | Yes | ||
| dest_y | Yes | ||
| target_layer_name | No | ||
| target_frame_index | No |