Resize canvas
gimp_resize_canvasResize the canvas without resampling image content; optionally shift or resize layers to fit the new dimensions.
Instructions
Change the canvas size without resampling. Layers move by (offset_x, offset_y) and keep their size, unless resize_layers is 'all' or 'image-sized' (layers that covered the old canvas): those grow or shrink to the canvas, new areas transparent or fill_color. 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": {
"image": "<image>",
"width": "<width>",
"height": "<height>"
},
"name": "gimp_resize_canvas"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| image | Yes | Image id from gimp_status, e.g. 'image:1@a1b2c3d4'. | |
| width | Yes | Pixels. | |
| height | Yes | Pixels. | |
| offset_x | No | ||
| offset_y | No | ||
| fill_color | No | Fill new layer areas (default: transparent). | |
| resize_layers | No | none |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| dirty | Yes | ||
| image | Yes | ||
| width | Yes | ||
| height | Yes |