I have recently become aware of the pixel sorting family of image effect methods and wanted to experiment with it myself. However, most implementations were part of larger tools and packages (like Photoshop) that I did not care for. So, I took it as an opportunity to use what I learned of Rust (an up-and-coming systems programming language) to practical use in this cute little project.

Table of contents


We implemented a group of pixel sorting methods matching the following scheme:

  1. Select a dimension to sort pixels along (either rows or columns).
  2. Select a property of a pixel to sort by. Currently, this is an individual component of the pixel's value in either HSL, HSV, or RGB color space.
  3. Select a property of pixels to be affected according to their sorted order. Much like the comparison property, currently this can be one or more components of the pixel's value in either HSL, HSV, or RGB color space.

This are quite basic sorting criteria, and we plan on adding more complexity in the future when we have the time. Nonetheless, these produce some pretty interesting results already, as you can see below.


Pixel sorting

Source code

You can view the source code and usage instructions on GitHub.

See also