Image Processing
Generate a task-specific Pillow script under <temp-dir>. This skill does not bundle a CLI.
uv run --with Pillow <temp-dir>/image-task.py
Safety
- Inspect source dimensions, mode, format, and animation first
- NEVER overwrite originals without explicit user intent
- Write transformed files to explicit output paths
- Preserve animation only when the requested format supports it
- Test batch logic on one representative file first
Required follow-up reads
| Need | Read | When |
|---|---|---|
| Pillow setup, format choice, and implementation patterns | references/pillow-patterns.md |
Before writing the task-specific script |
Workflow
- Resolve input and output paths with
pathlib.Path - Inspect images with
Image.open()before transformation - Select the smallest matching pattern from
references/pillow-patterns.md - Write a task-specific script under
<temp-dir> - Run it through the documented
uvcommand - Re-open outputs and verify dimensions, mode, and format