Fast, simple image format conversion for files. Built on Pillow and designed for clean CLI usage.
- Convert between many formats (
png,jpg,webp, and more). - Batch conversion for files and directories.
- Optional recursive traversal.
- Optional removal of source files after successful conversion.
pip install -r requirements.txtThe most stable cross-platform install is pipx because it isolates dependencies and exposes a clean command.
./scripts/install.sh.\scripts\install.ps1After install, use like:
imc --help
imc convert image.webp --to pngpython main.py list-formats
python main.py convert image.webp --to png
python main.py convert images/ --to jpg --recursive --output out
python main.py convert image.png --to webp --remove-source| Command | Description | Example |
|---|---|---|
list-formats |
List all supported extensions. | python main.py list-formats |
convert |
Convert files or directories to a target format. | python main.py convert images/ --to png |
| Flag | Alias | Type | Default | Description |
|---|---|---|---|---|
--to |
-t |
string | required | Target extension (e.g. png, jpg, webp). |
--output |
-o |
path | none | Output directory or file path. |
--recursive |
-r |
boolean | false |
Traverse folders recursively. |
--overwrite |
boolean | false |
Overwrite existing files. | |
--remove-source |
boolean | false |
Remove source files after successful conversion. | |
--quality |
integer | none | Quality for JPEG/WEBP/AVIF (1-100). |
- If
--outputis omitted, converted files are saved next to their sources. - If
--outputis a directory, outputs go inside it. - If converting a directory with
--recursive, the folder structure is preserved inside the output directory. - If multiple inputs are provided,
--outputmust be a directory. - If a folder input is provided,
--outputmust be a directory.
Convert a single file to PNG:
python main.py convert image.webp --to pngConvert a folder recursively and delete originals:
python main.py convert photos/ --to jpg --recursive --remove-sourceSave outputs to a different directory:
python main.py convert photos/ --to webp --recursive --output converted/Set quality for JPEG/WEBP/AVIF:
python main.py convert image.png --to jpg --quality 85The global command name is imc.
- Use
list-formatsto see the exact extensions supported on your machine.