Crop
photopea_cropCrop the active document to a specified pixel rectangle, discarding all content outside the bounds. Use it to remove unwanted edges or focus on a precise image region.
Instructions
Crop the active document to a rectangle in pixels. Content outside the rectangle is discarded. Use get_document_info for the current size; use resize_canvas to add space instead.
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": {
"x": "<x>",
"y": "<y>",
"width": "<width>",
"height": "<height>"
},
"name": "photopea_crop"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| x | Yes | Left edge of the crop rectangle in pixels | |
| y | Yes | Top edge of the crop rectangle in pixels | |
| width | Yes | Width of the crop rectangle in pixels | |
| height | Yes | Height of the crop rectangle in pixels |