transform_image
Rotate or flip the whole photo: op 'rotate' (any degrees, so you can straighten, plus expand) or 'flip' (orientation horizontal or vertical). IRREVERSIBLE in this session: there is no undo, so make a checkpoint first when in doubt. REFUSES when the photo has a masked filter, or any filter made outside Editmamei: straighten and flip before adding masked filters, not after (crop is the one geometry change that is always safe afterward). A rotate by anything other than exactly 0/90/180/270 degrees is also refused while a position- or direction-dependent filter is present, since only a right angle keeps such a filter locked to the content: rotate at a right angle instead, or delete the filter (manage_filters op=delete) and re-add it afterwards. expand resizes the canvas to the rotated content's new bounds (like 'reveal all'); without it the corners fall outside the canvas and are cropped. Rotating a very large photo can take tens of seconds; if it times out the editing session restarts and unsaved work (filters, masks, any other open photo) is lost, so make a checkpoint first. With expand the rotated canvas must stay within the workspace's pixel limit.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| op | Yes | 'rotate' takes an arbitrary `degrees` (straighten) + `expand`. 'flip' takes `orientation`. | |
| image | Yes | Image id, as returned by open_photo. | |
| expand | No | rotate only. Resize the canvas to the rotated content's new bounds. Without it, rotated content can fall outside the original canvas and be cropped. | |
| degrees | No | rotate only. Arbitrary angle (straighten), not limited to 90° multiples. Positive rotates clockwise. | |
| orientation | No | flip only. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| width | No | ||
| height | No | ||
| degrees | No | ||
| effect_update_failures | No | Names of effect filters (position/direction/size-dependent ones tracked through geometry changes — a center, an angle, an offset, or a size-dependent blur radius under resize) whose own params could not be updated for this transform (a live update failure) -- they were restored to their OLD values in manage_filters's own ledger (guaranteed), and the live render was also asked to restore those same OLD values (best effort — it can, rarely, also fail). Omitted when every filter updated cleanly. |