Image PNM Crop
Crops a base64 portable anymap image using exact x, y, width, and height values and returns a new base64 image.
Run tool
Form input
Direct JSON or Markdown
Submit JSON directly or Markdown that can be converted into JSON.
Work steps
Inputs
| Name | Type | Required | Description |
|---|---|---|---|
base64 | base64 | Yes | Base64 P2 or P3 image |
x | integer | Yes | X |
y | integer | Yes | Y |
width | integer | Yes | Width |
height | integer | Yes | Height |
Outputs
| Name | Type | Description |
|---|---|---|
format | text | Format |
width | integer | Width |
height | integer | Height |
base64 | base64 | Base64 cropped image |
work | array | Work |
Sample request
{
"base64": "data:image/x-portable-anymap;base64,UDMKMiAyCjI1NQoyNTUgMCAwICAwIDI1NSAwICAwIDAgMjU1ICAyNTUgMjU1IDI1NQo=",
"x": 0,
"y": 0,
"width": 1,
"height": 2
}