Actions
Jump to:
cropcrop_folder
Crop a single image to an exact pixel box or a target aspect ratio and save a cropped copy.
Inputs
| Name | Type | Required / default | Values and notes |
image |
path |
required
|
|
box |
string |
optional, default ""
|
|
aspect |
string |
optional, default ""
|
|
gravity |
enum |
optional, default center
|
centertopbottomleftrighttop-lefttop-rightbottom-leftbottom-right |
out |
path |
optional, default ""
|
|
Outputs
| Name | Type | Notes |
file |
path |
|
box |
json |
|
Crop a folder
crop_folder
Crop every image in a folder to the same pixel box or aspect ratio, writing cropped copies to a 'cropped' subfolder.
Inputs
| Name | Type | Required / default | Values and notes |
folder |
path |
required
|
|
box |
string |
optional, default ""
|
|
aspect |
string |
optional, default ""
|
|
gravity |
enum |
optional, default center
|
centertopbottomleftrighttop-lefttop-rightbottom-leftbottom-right |
recursive |
bool |
optional, default false
|
|
Outputs
| Name | Type | Notes |
count |
int |
|
out_dir |
path |
|
Use it
Crop one image
Command line
shell
python app.py --action crop --params '{"image": "D:/path/to/image"}'
Run from the app’s own folder. Single quotes work in bash and PowerShell; in cmd.exe use double quotes and escape the inner ones.
MCP tool
mcp
run_action("image-cropper", "crop", {"image": "D:/path/to/image"})
Workflow node
json
{
"id": "n0",
"app": "image-cropper",
"action": "crop",
"params": {
"image": "D:/path/to/image"
},
"inputs": {}
}
Crop a folder
Command line
shell
python app.py --action crop_folder --params '{"folder": "D:/path/to/folder"}'
Run from the app’s own folder. Single quotes work in bash and PowerShell; in cmd.exe use double quotes and escape the inner ones.
MCP tool
mcp
run_action("image-cropper", "crop_folder", {"folder": "D:/path/to/folder"})
Workflow node
json
{
"id": "n0",
"app": "image-cropper",
"action": "crop_folder",
"params": {
"folder": "D:/path/to/folder"
},
"inputs": {}
}
Example prompts
Things you can say to Claude, Cursor or Codex once the MCP server is registered.
- crop every image in D:/photos to a 1:1 square, centered
- crop this image to the box 100,0,900,900
- batch-crop D:/renders to 16:9 anchored at the top