Transform
transformTransform pixels on a single cel by translating, flipping, rotating, scaling, outlining, or cropping to content. Supports only clean 90° rotations and integer scaling to preserve pixel art.
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'. | |
| 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. | |
| 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 |