Agent Skills: Image Extend

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.

UncategorizedID: agntswrm/agent-media/image-extend

Install this agent skill to your local

pnpm dlx add-skill https://github.com/agntswrm/agent-media/tree/HEAD/skills/image-extend

Skill Files

Browse the full folder contents for image-extend.

Download Skill

Loading file tree…

skills/image-extend/SKILL.md

Skill Metadata

Name
image-extend
Description
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.

Image Extend

Extends an image canvas by adding padding on all sides with a solid background color.

Command

npx agent-media@latest image extend --in <path> --padding <pixels> --color <hex> [options]

Inputs

| Option | Required | Description | |--------|----------|-------------| | --in | Yes | Input file path or URL | | --padding | Yes | Padding size in pixels to add on all sides | | --color | Yes | Background color for extended area (hex, e.g., "#FFFFFF"). Also flattens transparency. | | --dpi | No | DPI/density for output image (default: 300) | | --out | No | Output path, filename or directory (default: ./) |

Output

Returns a JSON object with the extended image path:

{
  "ok": true,
  "media_type": "image",
  "action": "extend",
  "provider": "local",
  "output_path": "extended_123_abc.png",
  "mime": "image/png",
  "bytes": 234567
}

Examples

Add white padding around an image:

npx agent-media@latest image extend --in photo.jpg --padding 50 --color "#FFFFFF"

Add colored border:

npx agent-media@latest image extend --in artwork.png --padding 100 --color "#E4ECF8"

Extend with custom DPI:

npx agent-media@latest image extend --in print-ready.jpg --padding 75 --color "#000000" --dpi 600

Providers

This action uses local processing only:

  • local - No API key required (uses Sharp)