ChromaCraft is a command-line image processing tool that allows you to apply various filters to your images. It is built using Rust and provides a simple way to enhance and modify images.
- Grayscale: Converts the image to grayscale.
- Brightness: Adjusts the brightness of the image.
- Contrast: Adjusts the contrast of the image.
- Invert: Inverts the pixels of the image.
- Edges: Detects edges in the image.
ChromaCraft accepts the following command-line arguments:
-i
,--input
: Sets the input image file path.-o
,--output
: Sets the output image file path.-f
,--filter
: Specifies the filter to apply. Available options:grayscale
,brightness
,contrast
,invert
,edges
.-a
,--adjustment
: Adjustment value for the brightness and contrast filters (optional).-w
,--width
: Sets the width of the output image (optional).-h
,--height
: Sets the height of the output image (optional).
Apply the grayscale filter to an image:
$ chromacraft -i input.jpg -o output.jpg -f grayscale
Adjust the brightness of an image by specifying the adjustment value:
$ chromacraft -i input.jpg -o output.jpg -f brightness -a 50
Adjust the contrast of an image by specifying the adjustment value:
$ chromacraft -i input.jpg -o output.jpg -f contrast -a 1.5
Invert the pixels of an image:
$ chromacraft -i input.jpg -o output.jpg -f invert
Detect edges in an image:
$ chromacraft -i input.jpg -o output.jpg -f edges
Resize an image by specifying the width and height:
$ chromacraft -i input.jpg -o output.jpg -w 800 -h 600
If you don't specify the width and height, the output image will have the same dimensions as the processed image.
To run ChromaCraft, you need to have Rust installed on your system. If you haven't installed Rust, you can do so by following the official Rust installation guide:
- Visit https://www.rust-lang.org/tools/install.
- Follow the instructions provided to install Rust.
To build ChromaCraft from source, follow these steps:
- Clone the ChromaCraft repository from GitHub using Git:
$ git clone https://github.com/joshburnsxyz/chromacraft.git
- Navigate to the project directory:
$ cd chromacraft
- Build the project using Cargo
$ cargo build --release
- Copy the built program onto your
$PATH
sudo cp ./target/release/chromacraft /usr/bin/chromacraft
This project is licensed under the MIT License.