RICO is the fastest, Rust-powered CLI tool designed for bulk image conversion and background removal.
It efficiently processes images in parallel, allowing you to quickly convert large numbers of files to your preferred format (e.g., PNG, JPEG) or remove backgrounds from thousands of images with ease.
Unbelievably fast: RICO removed the background from 5,740 images in under 5 seconds and converted 5,740 images to WebP in ~1 second on an M1 Max MacBook Pro, showcasing its extraordinary parallel processing power.
- Convert images to PNG, JPEG, BMP, WEBP.
- Remove backgrounds from images using fast edge detection.
- Parallel processing for high-speed performance.
- Skips unsupported formats (e.g., SVG) automatically.
- Lightweight and efficient Rust-powered CLI.
- Automatically creates output directories if they don’t exist.
You can quickly install Rico by running the following command in your terminal:
curl -fsSL https://raw.githubusercontent.com/ranajahanzaib/rico/main/install_rico.sh | sudo bashThis command will:
- Download the latest version of Rico.
- Build the release version using Cargo.
- Move the rico binary to
/usr/local/binfor system-wide access.
Note: Ensure you have sudo privileges as the script moves the binary to a system directory.
To build rico, you’ll need Rust installed. If you don’t have Rust, install it from https://www.rust-lang.org/.
git clone https://github.com/ranajahanzaib/rico.git
cd ricocargo build --releaseThe compiled binary will be in the target/release directory.
sudo mv target/release/rico /usr/local/bin/rico --versionThe rico CLI provides two main commands: convert and remove.
rico 1.0
RICO is a Rust-powered CLI tool for rapid, parallel image conversion.
USAGE:
rico <SUBCOMMAND> [OPTIONS]
SUBCOMMANDS:
remove Remove background from images
convert Convert images to different formats
help Print this help message
OPTIONS:
-h, --help Print help information
-V, --version Print version informationTo convert images in a folder to another format:
rico convert -s images/ -o converted/ -f jpg
Options for convert command:
-s, --source <source> Source directory for input images (required)
-o, --output <output> Output directory for converted images (optional, defaults to source directory)
-f, --format <format> Target format (png, jpg, bmp, webp) [default: png]Convert all images in images/ to WEBP and save them in converted/:
rico convert -s images/ -o converted/ -f webpConvert images in-place:
rico convert -s images/ -f webpTo remove backgrounds from images:
rico remove -s images/ -o processed/ --background
Options for remove command:
-s, --source <source> Source directory for input images (required)
-o, --output <output> Output directory for processed images (optional, defaults to source directory)
-b, --background Enable background removal
-e, --edge-threshold <value> Set the edge detection threshold (default: 30)
Remove backgrounds from all images in images/ and save to processed/:
rico remove -s images/ -o processed/ -bRemove backgrounds with a custom edge threshold:
rico remove -s images/ -o processed/ -b -e 40- PNG
- JPEG
- BMP
- WEBP
- PNG
- JPEG
- BMP
- WEBP
We welcome contributions! Feel free to submit pull requests or open issues.
- Follow Rust’s style guide.
- Write tests where appropriate.
- Optimize performance where possible.
This project is licensed under the MIT License. See LICENSE for details.
rico convert -s images/ -o converted/ -f webp