Image To Png
Converts image files to PNG using FFmpeg while preserving dimensions and alpha. Use when the user wants to convert images to PNG, transcode JPG/WebP/GIF/BMP/TIFF to PNG, export a game/UI texture as PNG, or mentions PNG conversion without background removal.
Get the complete skill folder, including its scripts and reference files.
When to use this skill
Use Image To Png when an AI agent needs a reusable SKILL.md workflow for this job: Converts image files to PNG using FFmpeg while preserving dimensions and alpha. Use when the user wants to convert images to PNG, transcode JPG/WebP/GIF/BMP/TIFF to PNG, export a game/UI texture as PNG, or mentions PNG conversion without background removal.
When not to use it
Skip Image To Png when the task is outside the coding category, or when a more specific skill in this directory already covers the same workflow with clearer triggers.
How to install
Where will you use it?
mkdir -p ~/.claude/skills/image-to-png # Save SKILL.md to ~/.claude/skills/image-to-png/SKILL.md
- Claude Code personal install: place the skill and its bundled files at ~/.claude/skills/image-to-png/SKILL.md. For a shared project, commit the folder at .claude/skills/image-to-png/ instead.
- Current Claude Code detects SKILL.md changes in watched directories during the session. If you just created a top-level skills directory, run /reload-skills. Check that the skill is listed before testing its trigger.
- For Claude chat or Cowork in the Desktop app, manage uploaded skills in Customize > Skills; copying files into a local Claude Code folder is not a Desktop install. Other agents may use different install locations.
Full install guide for Claude, Cursor, and Codex →
Try a starter prompt
After installing the skill, paste this starter prompt into your agent to verify it triggers on a small task.
Use the Image To Png skill for this task: Use Image To Png when this documented workflow matches the task. Confirm any required inputs or files before making changes.
What supports this recommendation?
70/100 provisional content score. This measures documentation, practical detail and source signals. It is not a measured task success rate or a security certification.
- Documentation
- 77/100
- Practical detail
- 68/100
- Source evidence
- 61/100
- Source signals
- 70/100
Model compatibility evidence
- claudeuntested
No model-specific signal or recorded compatibility test was found.
- chatgptuntested
No model-specific signal or recorded compatibility test was found.
- geminiuntested
No model-specific signal or recorded compatibility test was found.
- copilotuntested
No model-specific signal or recorded compatibility test was found.
- llamauntested
No model-specific signal or recorded compatibility test was found.
- perplexityuntested
No model-specific signal or recorded compatibility test was found.
- mistraluntested
No model-specific signal or recorded compatibility test was found.
- grokuntested
No model-specific signal or recorded compatibility test was found.
Inferred compatibility is based on content signals. Check the app, its available tools and setup requirements before running a skill.
What this skill does
# Image to PNG
Convert a **single image file** to **lossless PNG** via FFmpeg. **Defaults preserve source quality** — dimensions unchanged, alpha channel kept when present.
## Rules
When this skill applies, read and follow [skill-dependency-manager](../skill-dependency-manager.md) — run scripts as documented, install missing tools into `.dependency/`.
- Run `convert.py` through the bundled script — do not hand-write `ffmpeg -i …` commands. - **Single file only.** Pass one image with `--image`; directories are not supported. - **Never overwrite source files.** Output goes to `image-to-png/` (or `--output`) by default. - **Do not resize or recompress** unless the user explicitly asks — omit quality/size overrides. - `populated: false` for `ffmpeg` is not a reason to skip. Install first, set `populated: true`, retry the same command.
## Setup (first run)
1. Download FFmpeg and extract to `.dependency/ffmpeg/` (see skill-dependency-manager).
Windows result example: `.dependency/ffmpeg/bin/ffmpeg.exe`
2. Register in `.dependency/manifest.json`:
```json "ffmpeg": { "populated": true, "bin": ".dependency/ffmpeg/bin/ffmpeg.exe" } ```
Use `bin/ffmpeg` on Unix (no `.exe`).
## Quick Start
**Default: create an `image-to-png/` folder beside the input file** and write the PNG there:
```bash # assets/ui/icon.webp → assets/ui/image-to-png/icon.png .dependency/python/python .ai/image-to-png/convert.py --image assets/ui/icon.webp ```
Custom output path:
```bash .dependency/python/python .ai/image-to-png/convert.py --image assets/ui/icon.webp -o assets/ui_png ```
Strip alpha (RGB output):
```bash .dependency/python/python .ai/image-to-png/convert.py --image assets/sprites/hero.webp --strip-alpha ```
## Format Defaults
| Setting | Default | Notes | |---------|---------|-------| | Dimensions | Preserve source | No resize unless user asks separately | | Alpha | Preserve | RGBA when source has transparency | | Already PNG | Stream copy | Bit-perfect when `--strip-alpha` is off | | Animated GIF | First frame | Multi-frame GIF export not supported |
## Defaults
| Option | Default | Notes | |--------|---------|-------| | `--image` | **Required** | Single supported image file | | Output | `<image-dir>/image-to-png/<name>.png` | Use `-o` / `--output` for custom file or directory | | `--strip-alpha` | off | Force RGB PNG without alpha |
Supported inputs: `.jpg`, `.jpeg`, `.png`, `.webp`, `.gif`, `.bmp`, `.tif`, `.tiff`, `.avif`, `.ico`.
## Agent Workflow
1. **Paths** — Pass whatever image path the user gives. Output lands in `image-to-png/` next to that file by default. 2. **One file per run** — convert one image, verify the result, then repeat for additional files if needed. 3. **Already PNG?** Stream-copied by default (no generation loss) unless `--strip-alpha` is set. 4. **Revert** — delete output file or `git restore`; sources are never modified.
## Agent Notes
1. Use the bundled script, not hand-written FFmpeg commands. 2. Missing Python/FFmpeg → populate `.dependency/` per skill-dependency-manager, retry same command. 3. **Do not copy, move, or replace the source with converted output** — tell the user where the output file is. 4. Need **transparent cutouts** → use [image-remove-background](../image-remove-background/SKILL.md), not this skill. 5. Need **resize** after conversion → [image-resize](../image-resize/SKILL.md). 6. FFmpeg codec and probing details: [reference.md](reference.md)
## Troubleshooting
| Issue | Fix | |-------|-----| | `ffmpeg` missing in manifest | Follow **Setup**; update manifest | | Directory passed to `--image` | Run once per file; this skill accepts image files only | | Output already exists | Delete the existing output or choose a different `-o` path | | Animated GIF | Only first frame is exported by default | | Need RGB only | Add `--strip-alpha` |
## CLI
Copy-paste commands: [cli/image-to-png.md](../../../cli/image-to-png.md)
## Related
- Resize after conversion: [image-resize](../image-resize/SKILL.md) - Transparent cutouts: [image-remove-background](../image-remove-background/SKILL.md)
Intended uses
- Use Image To Png when this documented workflow matches the task.
Implementation notes
- Review the source instructions and adapt inputs before running the workflow.
Try it, then tell us how it went
A copied prompt does not tell us whether the task worked. Report your result after checking the output. We collect your tool and outcome, never your files or prompt.