Code Monkey home page Code Monkey logo

chromacraft's Introduction

ChromaCraft

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.

Available Filters

  • 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.

Usage

Command-line Arguments

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).

Examples

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.

installation

Prerequisites

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:

  1. Visit https://www.rust-lang.org/tools/install.
  2. Follow the instructions provided to install Rust.

Building from Source

To build ChromaCraft from source, follow these steps:

  1. Clone the ChromaCraft repository from GitHub using Git:
$ git clone https://github.com/joshburnsxyz/chromacraft.git
  1. Navigate to the project directory:
$ cd chromacraft
  1. Build the project using Cargo
$ cargo build --release
  1. Copy the built program onto your $PATH
sudo cp ./target/release/chromacraft /usr/bin/chromacraft

License

This project is licensed under the MIT License.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.