PixelSort is a customisable CLI program that manipulates images through sorting columns or rows of pixels, producing unique "glitchy" yet beautiful effects.
This image was produced with the default pixelsort arguments
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.
Currently only manual installation is supported while pixelsort is pre-release.
You can download pre-built binaries over on the releases page.
Feel free to build and install from the source code directly (this requires the latest Rust compiler).
cargo install --git https://github.com/Void-ux/pixelsort.git pixelsort
Pixelsort is relatively simple to use, simply run:
$ pixelsort image.png
This will apply the default arguments. You can customize pixelsort using arguments, for example:
$ pixelsort image.png -r 90 --exclude random_exclude --sort saturation -o sorted_image.png
Which will:
- Sort the pixels horizontally instead of vertically.
- Exclude pixels randomly, meaning that each pixel will have a 20% chance of not "moving".
- Sort the pixels based by their saturation in ascending order. So the "blandest" pixels will be at the top of the column.
- Output the sorted image as "sorted_image.png" in the current directory.
For more information on arguments/options, run
$ pixelsort --help