Skip to content

sofaspawn/pxlate

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

44 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

pxlate

  • generates pixel art for your image

  • and maybe occasionally smudge it too..

  • special thanks to Alexander for the improved binary size

Pixelate:

test_image pixelated image

Smudge:

test_image smudged image

Requirements

  • Rust (version 1.65 or later)

Getting Started

Follow the steps below to clone the repository and build the project.

1. Clone the Repository

To get started, clone the repository to your local machine:

git clone https://github.com/sofaspawn/pxlate.git
cd pxlate

2. Build the Project

Next, build the project using the following command:

cargo build --release

3. Run the Project

Finally, run the project using the following command:

cargo run --release

4. Binary Installation(Optional)

To install the binary on your system, run the following command:

cargo install --path .

This allows you to the application as a command:

pxlate pixelate <image_path> <output_image> 20

TODO:

  • take image as input in the form of command arguements

  • read the image pixels

  • make a square window of 2x2 pixels

  • replace the window with the average value of the 2x2 pixel grid

  • move the window for the entire image

  • render the image

  • add more functions such as "actual" pixelate, negative, etc...

  • downscale image -> apply color from color pallete -> upscale image

  • improve the ui

  • add commands for changing the scaling factor

  • add commands to check if the user wants to pixelate or smudge

  • automatically change the scaling factor based on the file size of images

  • restructure the color palette code

  • gracefully handle errors

Problems:

  • black is almost always red (check the color_diff)
  • the scaling factor changes for every image i.e. make it more user friendly i.e.i.e. add a command for that

About

CLI tool to Pixelate/Smudge/Negative any image in rust

Resources

Stars

Watchers

Forks

Contributors

Languages