Loading...
Loading...
Compare original and translation side by side
agent-media image crop --in <path> --width <px> --height <px> [options]agent-media image crop --in <path> --width <px> --height <px> [options]| Option | Required | Description |
|---|---|---|
| Yes | Input file path or URL |
| Yes | Width of crop area in pixels |
| Yes | Height of crop area in pixels |
| No | Focal point X position 0-100 (default: 50 = center) |
| No | Focal point Y position 0-100 (default: 50 = center) |
| No | DPI/density for output (default: 300) |
| No | Output path, filename or directory (default: ./) |
| No | Provider to use (default: local) |
| 选项 | 是否必填 | 说明 |
|---|---|---|
| 是 | 输入文件路径或URL |
| 是 | 裁剪区域的宽度(像素) |
| 是 | 裁剪区域的高度(像素) |
| 否 | 焦点X轴位置 0-100(默认值:50 = 居中) |
| 否 | 焦点Y轴位置 0-100(默认值:50 = 居中) |
| 否 | 输出文件的DPI/密度(默认值:300) |
| 否 | 输出路径、文件名或目录(默认值:./) |
| 否 | 使用的处理提供商(默认值:local) |
{
"ok": true,
"media_type": "image",
"action": "crop",
"provider": "local",
"output_path": "cropped_123_abc.png",
"mime": "image/png",
"bytes": 45678
}{
"ok": true,
"media_type": "image",
"action": "crop",
"provider": "local",
"output_path": "cropped_123_abc.png",
"mime": "image/png",
"bytes": 45678
}agent-media image crop --in photo.jpg --width 800 --height 600agent-media image crop --in photo.jpg --width 800 --height 600 --focus-x 20 --focus-y 30agent-media image crop --in https://example.com/image.jpg --width 1024 --height 768 --out ./outputagent-media image crop --in photo.jpg --width 800 --height 600agent-media image crop --in photo.jpg --width 800 --height 600 --focus-x 20 --focus-y 30agent-media image crop --in https://example.com/image.jpg --width 1024 --height 768 --out ./output