A fast and simple command-line image processing tool written in Rust. Mirage provides essential image manipulation operations with an intuitive interface.
| Feature | Description |
|---|---|
| Blur | Apply gaussian blur with configurable intensity (0-100%) |
| Brighten | Adjust image brightness with positive or negative values |
| Crop | Extract rectangular regions from images |
| Rotate | Rotate images by 90°, 180°, or 270° |
| Invert | Create negative images by inverting colors |
| Grayscale | Convert color images to grayscale |
| Fractal | Generate beautiful fractal images |
| Generate | Create solid color images (coming soon) |
git clone https://github.com/yourusername/mirage.git
cd mirage
cargo build --releaseThe binary will be available at target/release/mirage.
- Rust 1.70+ (2021 edition)
- Cargo package manager
mirage <COMMAND> [OPTIONS]# Blur the image
cargo run -- blur Test_Image.PNG blurred.png 10
# Convert to grayscale
cargo run -- grayscale Test_Image.PNG gray.png
# Generate a fractal
cargo run -- fractal my_fractal.png 400 400| Command | Description | Arguments |
|---|---|---|
blur |
Apply gaussian blur | <infile> <outfile> <percent> |
brighten |
Adjust brightness | <infile> <outfile> <amount> |
crop |
Extract image region | <infile> <outfile> <x> <y> <width> <height> |
rotate |
Rotate image | <infile> <outfile> <degrees> |
invert |
Invert colors | <infile> <outfile> |
grayscale |
Convert to grayscale | <infile> <outfile> |
fractal |
Generate fractal | <outfile> <width> <height> |
generate |
Create solid color image | <outfile> <value> (coming soon) |
# General help
mirage --help
# Command-specific help
mirage blur --helpMirage supports common image formats including:
- JPEG/JPG
- PNG
- BMP
- TIFF
- WebP
- And more via the
imagecrate
- Generated images can be viewed in any web browser or image viewer
- Use different file extensions (.png, .jpg, .bmp) as needed for output
- The tool automatically detects input format and can convert between formats
cargo buildcargo testcargo run -- <command> [args]Example:
cargo run -- blur test.jpg blurred.jpg 25image- Image processing libraryclap- Command line argument parsinganyhow- Error handlingnum-complex- Complex number support for fractals
Contributions are welcome! Please feel free to submit issues and pull requests.
- Implement the
generatecommand - Add more image filters (sharpen, contrast, etc.)
- Support for batch processing
- Add configuration file support
- Implement additional fractal types
This project is licensed under the MIT License - see the LICENSE file for details.
- Fractal generation code adapted from PistonDevelopers/image
- Built with the excellent Rust
imagecrate