Transform
transformApply translate, flip, rotate, scale, outline, or crop to content on a single cel (one layer and frame) in Aseprite. Non-90° rotations and non-integer scales require lossy mode.
Instructions
Move, flip, rotate or scale pixels on ONE cel — the target layer's image on the target frame. Ops: 'translate', 'flip', 'rotate', 'scale', 'outline', 'crop_to_content'. To transform part of a cel, crop the region out with draw op 'blit' first; there is no selection-scoped transform. Rotation is only clean at 90° multiples — arbitrary angles destroy pixel art, so anything else needs allowLossy. Scaling is nearest-neighbour and integer-only for the same reason.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| dx | No | ||
| dy | No | ||
| op | Yes | ||
| axis | No | For 'flip'. | |
| side | No | For 'outline'. 'outside' paints transparent pixels touching opaque ones, growing the cel by one pixel each way. 'inside' recolours opaque pixels that touch transparency instead, same size in and out. | outside |
| angle | No | Degrees, clockwise. For 'rotate'. | |
| color | No | Outline colour, for 'outline'. | |
| frame | No | 1-based frame number. Omit to use the active frame. | |
| layer | No | Layer name. Omit to use the active layer. | |
| factor | No | For 'scale'. | |
| sprite | No | Which sprite: its id as '#7' (what every result reports back, and the only unambiguous form — two unsaved documents are both called 'Sprite'), its filename, or its display name. Omit to use the sprite Aseprite has focused. | |
| diagonals | No | For 'outline'. Treat diagonal neighbours as touching too (8-neighbour instead of 4). | |
| thickness | No | ||
| allowLossy | No | Permit a non-90° rotation or non-integer scale. Ask the user first. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| op | Yes | ||
| bounds | No | ||
| sprite | Yes | ||
| pixelsChanged | Yes |