I built slimg, a CLI tool for image optimization written in Rust. It handles format conversion, compression, resizing, cropping, and extending (adding padding) — with batch processing support.
Codecs: MozJPEG, OxiPNG (Zopfli), libwebp, AVIF (ravif/dav1d), QOI, JPEG XL (decode-only).
## Example usage:
slimg convert photos/ --format webp --output out/ --recursive --jobs 4
slimg optimize photo.jpg --quality 70
slimg resize photo.jpg --width 800
slimg crop photo.jpg --aspect 16:9
Beyond the CLI, the core library (slimg-core) is on crates.io, and I also built language bindings via UniFFI:
- Kotlin/JVM (Maven Central): fluent API for server-side image processing
- Python (PyPI): for scripting and pipeline integration
## Install:cargo install slimg
brew install clroot/tap/slimg
pip install slimg
All five platforms supported (macOS/Linux/Windows, x86_64/ARM64).
GitHub: https://github.com/clroot/slimg