https://github.com/void-ux/pixelsort
CLI image manipulation tool to pixel sort images
https://github.com/void-ux/pixelsort
image image-manipulation image-processing pixel-sorting rust
Last synced: 24 days ago
JSON representation
CLI image manipulation tool to pixel sort images
- Host: GitHub
- URL: https://github.com/void-ux/pixelsort
- Owner: Void-ux
- License: mit
- Created: 2024-02-04T17:37:33.000Z (over 1 year ago)
- Default Branch: master
- Last Pushed: 2024-02-08T11:42:10.000Z (over 1 year ago)
- Last Synced: 2025-03-19T00:23:22.938Z (4 months ago)
- Topics: image, image-manipulation, image-processing, pixel-sorting, rust
- Language: Rust
- Homepage:
- Size: 688 KB
- Stars: 49
- Watchers: 1
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE.md
Awesome Lists containing this project
README
# PixelSort
PixelSort is a customisable CLI program that manipulates images through sorting columns or rows of pixels, producing unique "glitchy" yet beautiful effects.
## Showcase
*This image was produced with the default pixelsort arguments*
## Features
Before delving into the features, it is worth understanding how pixelsort works. Essentially, pixels are taken either by columns (vertically) or by rows (horizontally) and sorted. Certain pixels can be excluded from the sort (so their position is never moved) through certain critera, for example, if a pixel is bright enough, it won't be moved.
- Pixelsort is **very fast**, programmed in Rust with attention to programmatic design choice.
- Pixelsort is generally very customisable, with different pixel exclusion algorithms allowing user-definable thresholds.
- Pixelsort supports many different formats, such as **png**, **webp** and **jpeg**.## Installation
Currently only manual installation is supported while pixelsort is pre-release.
### Manual
#### Downloading
You can download pre-built binaries over on the [releases page](https://github.com/Void-ux/pixelsort/releases).
#### Building
Feel free to build and install from the source code directly (this requires the latest Rust compiler).
```shell
cargo install --git https://github.com/Void-ux/pixelsort.git pixelsort
```### Usage
Pixelsort is relatively simple to use, simply run:
```shell
$ pixelsort image.png
```This will apply the default arguments. You can customize pixelsort using arguments, for example:
```shell
$ pixelsort image.png -r 90 --exclude random_exclude --sort saturation -o sorted_image.png
```Which will:
1. Sort the pixels horizontally instead of vertically.
2. Exclude pixels randomly, meaning that each pixel will have a 20% chance of not "moving".
3. Sort the pixels based by their saturation in ascending order. So the "blandest" pixels will be at the top of the column.
4. Output the sorted image as "sorted_image.png" in the current directory.For more information on arguments/options, run
```shell
$ pixelsort --help
```