This Python script processes an image by sorting its pixels based on brightness. The sorting can be done either horizontally or vertically within masked regions of the image, determined by brightness thresholds. Inspired by Kim Asendorf's ASDF Pixel Sort
- Sort pixels by brightness
- Supports vertical and horizontal sorting
- Customizable brightness thresholds
- Clone this repository:
git clone https://github.com/madmattp/PixelLuminanceSorter.git
- Install the required dependencies:
pip install pillow
- Adjust the settings inside the script:
image_name
: Image to be sortedmin_bright
: Minimum brightness thresholdmax_bright
: Maximum brightness thresholdopt
: Sorting direction (0 for vertical, 1 for horizontal)reverse
: Whether to reverse the sorting order
- Run the script:
python PixelLuminanceSorter.py
- The sorted image will be saved as
sorted_image.png
.
This project is inspired by the work of Kim Asendorf.