photo-processing

Resize, convert, recolor, mask, and split images into transparent icons and sprite sheets.

Updated Sep 10, 2026
One-click install
npx skills add https://github.com/lunarmoon26/agent-skills --skill photo-processing-lunarmoon26
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: photo-processing
Source: https://github.com/lunarmoon26/agent-skills/tree/main/skills/photo-processing
Command: npx skills add https://github.com/lunarmoon26/agent-skills --skill photo-processing-lunarmoon26

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill requires Pillow, and includes scripts (resource) components.

What problem does it solve? Editing image assets by hand—resizing exports, removing backgrounds, cutting sprite sheets, and generating CSS positions—is repetitive and error-prone. This Skill performs deterministic, non-destructive image operations from the command line so agents can produce consistent PNG, WebP, AVIF, ICO, and other outputs without overwriting source files. ## Core Features & Use Cases - Resize and Convert: Batch-resize images with contain/cover/fill/inside fit modes, pad to exact dimensions, and export multiple formats including multi-resolution ICO favicons. - Transparency and Masking: Remove backgrounds with color keying, luminance keying, Magic Wand-style contiguous flood fill, or recolor artwork into single-color icons with alpha preserved. - Sprite Sheet Splitting: Cut regular icon grids into individual assets while emitting JSON metadata, CSS background-position rules, and an annotated preview for verifying crop geometry. - Use Case: Given a weather icon sprite sheet with a black background, remove the black via key-color, split the 8x4 grid into trimmed square PNG icons, and generate the matching CSS sprite classes in one workflow. ## Quick Start Ask the agent to inspect your image, then resize it to 512x512 PNG with a transparent background using the photo-processing skill.

Frequently Asked Questions about photo-processing

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I remove an image background from the command line?▼

Use the key-color command to remove all pixels within a tolerance distance of a known background color, adding --feather to soften anti-aliased edges. For a contiguous region only, use flood-fill with a seed coordinate, which works like Photoshop's Magic Wand with Contiguous enabled.

How to split a sprite sheet into individual icons with CSS positions?▼

Run the sprite-grid command with the grid origin, cell size, gaps, columns, and rows. It cuts each cell into its own image and writes JSON metadata with sourceRect values plus a CSS file containing background-position rules for every sprite.

Which image formats support transparent backgrounds when exporting?▼

PNG, WebP, AVIF, and TIFF preserve alpha transparency in the output. JPEG and BMP cannot store alpha, so the script flattens transparency onto a background color, white by default, when exporting to those formats.

What is the difference between flood-fill and key-color for background removal?▼

Flood-fill changes only the region connected to a seed pixel, matching Photoshop's contiguous Magic Wand, while key-color changes every matching pixel across the entire image. Use flood-fill when enclosed artwork shares the background color and must remain untouched.

Why does the script refuse to process my animated GIF or WebP?▼

The script rejects multi-frame inputs by default to avoid silently discarding animation frames. Pass --first-frame to explicitly process only the first frame of an animated image.

What dependencies are required to run the photo processing script?▼

The script requires uv and Python 3.11 through 3.14, with Pillow 12.3.0 pinned via PEP 723 inline metadata. Running the documented prepare command once lets subsequent uv executions work offline.