Rotate layer
gimp_rotate_layerRotate a GIMP layer or group clockwise around its center, choosing clipped bounds or expanded bounds to keep all pixels.
Instructions
Rotate a layer or group by angle degrees (clockwise) around its center. clip='adjust' grows the layer to keep all pixels, 'clip' keeps the original bounds. Multiples of 90 are lossless with interpolation 'none'; other angles resample. One undo step.
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": {
"item": "<item>",
"angle": "<angle>"
},
"name": "gimp_rotate_layer"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| clip | No | adjust | |
| item | Yes | Item id (layer, group, mask...) e.g. 'item:5@a1b2c3d4'. | |
| angle | Yes | Degrees, clockwise. | |
| interpolation | No | Resampling: none (nearest neighbour, hard edges), linear, cubic, nohalo, lohalo. | cubic |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| x | Yes | Offset of the layer's top-left corner in image pixels. | |
| y | Yes | ||
| id | Yes | ||
| kind | Yes | ||
| mask | Yes | ||
| mode | Yes | GIMP layer mode nick, e.g. 'normal', 'multiply'. | |
| name | Yes | Layer name. GIMP keeps names unique within an image ('Title #1'). | |
| locks | Yes | ||
| width | Yes | ||
| height | Yes | ||
| parent | Yes | Id of the parent group, null at the top level. | |
| opacity | Yes | 0-100. | |
| visible | Yes | ||
| children | No | Child layers of a group, top-most first; null for non-groups. | |
| has_alpha | Yes |