Learn-skills.dev 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.

install
source · Clone the upstream repo
git clone https://github.com/NeverSight/learn-skills.dev
Claude Code · Install into ~/.claude/skills/
T=$(mktemp -d) && git clone --depth=1 https://github.com/NeverSight/learn-skills.dev "$T" && mkdir -p ~/.claude/skills && cp -r "$T/data/skills-md/agntswrm/agent-media/image-extend" ~/.claude/skills/neversight-learn-skills-dev-image-extend && rm -rf "$T"
manifest: data/skills-md/agntswrm/agent-media/image-extend/SKILL.md
source content

Image Extend

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

Command

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

Inputs

OptionRequiredDescription
--in
YesInput file path or URL
--padding
YesPadding size in pixels to add on all sides
--color
YesBackground color for extended area (hex, e.g., "#FFFFFF"). Also flattens transparency.
--dpi
NoDPI/density for output image (default: 300)
--out
NoOutput 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:

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

Add colored border:

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

Extend with custom DPI:

agent-media 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)