Crop image
gimp_crop_imageCrop an image to a specified pixel rectangle inside the canvas, discarding outside pixels in one undoable step.
Instructions
Crop the image to the rectangle (x, y, width, height) in image pixels, which must lie inside the canvas. Destructive: layer pixels outside the rectangle are discarded. 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>",
"x": "<x>",
"y": "<y>",
"width": "<width>",
"height": "<height>"
},
"name": "gimp_crop_image"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| x | Yes | ||
| y | Yes | ||
| image | Yes | Image id from gimp_status, e.g. 'image:1@a1b2c3d4'. | |
| width | Yes | Pixels. | |
| height | Yes | Pixels. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| dirty | Yes | ||
| image | Yes | ||
| width | Yes | ||
| height | Yes |