| Crates.io | imgconv |
| lib.rs | imgconv |
| version | 0.1.7 |
| created_at | 2026-01-17 16:16:35.700037+00 |
| updated_at | 2026-01-18 01:58:27.553518+00 |
| description | A professional command-line tool for converting images between different formats |
| homepage | https://github.com/cumulus13/imgconv |
| repository | https://github.com/cumulus13/imgconv |
| max_upload_size | |
| id | 2050729 |
| size | 81,834 |
A professional, fast, and reliable command-line tool for converting images between different formats.
cargo install imgconv
git clone https://github.com/cumulus13/imgconv
cd imgconv
cargo install --path .
git clone https://github.com/cumulus13/imgconv
cd imgconv
cargo build --release
# Binary will be at ./target/release/imgconv
The simplest way to convert an image:
imgconv input.webp output.png
imgconv -i photo.jpg -o photo.webp
Specify quality for lossy formats (1-100, default: 90):
imgconv input.png output.jpg -q 85
Paste from clipboard (works with IrfanView, GIMP, Photoshop, browsers, etc.):
# Auto-detect format from clipboard
imgconv -c output_image
# Output: output_image.png (or detected format)
# Specify output extension (auto-corrects if mismatch)
imgconv -c output_image.png
# If clipboard is JPG → auto-corrects to output_image.jpg
# Force conversion to specific format
imgconv -c output_image -e jpg
# Clipboard PNG → converts to output_image.jpg
imgconv -c output_image.png -e webp
# Any clipboard format → converts to output_image.webp
Clipboard behavior:
-e: Auto-detects format and corrects extension if needed-e: Forces conversion to specified formatWhen output filename doesn't have an extension:
imgconv input.jpg output -f png
This will create output.png
All these commands are valid:
# Positional arguments
imgconv image.bmp image.png
# With input flag only
imgconv -i photo.webp output.jpg
# With output flag only
imgconv input.png -o result.jpg -q 95
# All flags
imgconv -i input.avif -o output.png -f png -q 100
| Format | Extension(s) | Read | Write |
|---|---|---|---|
| PNG | .png |
✅ | ✅ |
| JPEG | .jpg, .jpeg |
✅ | ✅ |
| GIF | .gif |
✅ | ✅ |
| BMP | .bmp |
✅ | ✅ |
| ICO | .ico |
✅ | ✅ |
| TIFF | .tiff, .tif |
✅ | ✅ |
| WebP | .webp |
✅ | ✅ |
| AVIF | .avif |
✅ | ✅ |
| PNM | .pnm, .pbm, .pgm, .ppm |
✅ | ✅ |
| TGA | .tga |
✅ | ✅ |
| DDS | .dds |
✅ | ✅ |
| HDR | .hdr |
✅ | ✅ |
| Farbfeld | .ff |
✅ | ✅ |
imgconv photo.webp photo.png
Copy image in any image viewer (IrfanView, GIMP, browser), then:
# Save as detected format
imgconv -c my_image
# Save as PNG
imgconv -c screenshot.png
# Convert clipboard to JPEG
imgconv -c photo -e jpg -q 85
Convert all WebP files to PNG in the current directory:
Linux/macOS:
for f in *.webp; do imgconv "$f" "${f%.webp}.png"; done
Windows PowerShell:
Get-ChildItem *.webp | ForEach-Object { imgconv $_.Name ($_.BaseName + ".png") }
Windows CMD:
for %f in (*.webp) do imgconv "%f" "%~nf.png"
Reduce JPEG file size with lower quality:
imgconv large.jpg compressed.jpg -q 75
Modern format with great compression:
imgconv photo.png photo.webp -q 80
Combine with other tools like ImageMagick:
# Resize then convert
convert input.jpg -resize 200x200 temp.jpg && imgconv temp.jpg thumbnail.webp -q 85
Usage: imgconv [OPTIONS] [INPUT] [OUTPUT]
Arguments:
[INPUT] Positional input file (alternative to -i)
[OUTPUT] Positional output file (alternative to -o)
Options:
-i, --input <FILE> Input image file (conflicts with -c)
-o, --output <FILE> Output image file or directory
-c, --clipboard Paste image from clipboard
-f, --format <FORMAT> Output format (auto-detected from extension if not specified)
[possible values: png, jpeg, jpg, gif, bmp, ico, tiff, tif,
webp, avif, pnm, tga, dds, hdr, farbfeld]
-e, --extension <EXT> Extension for output file (use with -c for conversion)
-q, --quality <NUM> Quality for lossy formats like JPEG (1-100) [default: 90]
-V, --version Print version information
-h, --help Print help
imgconv is built with Rust and optimized for performance:
imgconv provides clear, helpful error messages:
$ imgconv missing.jpg output.png
Error: Input file not found: missing.jpg
$ imgconv input.jpg output.xyz
Error: Could not determine output format from 'output.xyz'.
Please specify --format or use a recognized extension
Contributions are welcome! Please feel free to submit a Pull Request.
git checkout -b feature/AmazingFeature)git commit -m 'Add some AmazingFeature')git push origin feature/AmazingFeature)This project is licensed under either of:
at your option.
Made with ❤️ using Rust