ai_modeling_image_crop
Crop images locally to a specified region with an optional aspect ratio and fixed output size, then save the result as a PNG.
Instructions
crop an image locally with an optional aspect ratio and fixed output size, saving PNG
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_path": "<image_path>",
"destination_path": "<destination_path>",
"left": "<left>",
"top": "<top>",
"width": "<width>",
"height": "<height>"
},
"name": "ai_modeling_image_crop"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| top | Yes | ||
| left | Yes | ||
| width | Yes | ||
| height | Yes | ||
| image_path | Yes | ||
| aspect_ratio | No | Optional crop ratio constraint (width / height); one source pixel of rounding is allowed. | |
| output_width | No | Resize the cropped area to this width, matching the browser fixed-output crop. | |
| output_height | No | ||
| destination_path | Yes |