Loading...
Loading...
Extends an image canvas by adding padding on all sides with a solid background color. Use when you need to add borders, margins, or expand the canvas area around an image.
npx skill4agent add agntswrm/agent-media image-extendagent-media image extend --in <path> --padding <pixels> --color <hex> [options]| Option | Required | Description |
|---|---|---|
| Yes | Input file path or URL |
| Yes | Padding size in pixels to add on all sides |
| Yes | Background color for extended area (hex, e.g., "#FFFFFF"). Also flattens transparency. |
| No | DPI/density for output image (default: 300) |
| No | Output path, filename or directory (default: ./) |
{
"ok": true,
"media_type": "image",
"action": "extend",
"provider": "local",
"output_path": "extended_123_abc.png",
"mime": "image/png",
"bytes": 234567
}agent-media image extend --in photo.jpg --padding 50 --color "#FFFFFF"agent-media image extend --in artwork.png --padding 100 --color "#E4ECF8"agent-media image extend --in print-ready.jpg --padding 75 --color "#000000" --dpi 600