The #ShittyCameraChallenge: Practising Pixel Sorting with Processing,13 June 2023

The #ShittyCameraChallenge: Practising Pixel Sorting with Processing,13 June 2023

I'm really enjoying experimenting with glitch art just lately. Having tried glitching with Audacity and WordPad, and still failing dismally with the Hex Editor, I thought I would try some pixel sorting. 

Pixel sorting is a glitch effect which selectively orders the pixels of an image in one direction or another, as defined by parameters such as hue, etc.

Unlike other glitch effects, pixel sorting can best be achieved with programming scripts. There are apps like GlitchLab that can be downloaded to an Android or Apple device, which makes pixel sorting so easy, but it feels so much like cheating.

Pixel sorting was developed sometime around 2010 by visual artist Kim Asendorf, who wrote a script (known as a sketch) in the Processing coding language. He made his sketch, ASDF Pixel Sort, open source and since then it has become the benchmark for future pixel sorting scripts.

The first thing I did was to go to and download the latest version of Processing (v. 4.2). Once downloaded I opened up .zip file, then extracted and installed Processing as instructed onto the computer. To make loading the file easier in the future I created a shortcut on the desktop. 

I then searched for 'ASDF Pixel Sort' on GitHub and downloaded the most recent version. When the sketch is running, the image files need to be in the same directory as the .pde file (the file format for sketches in Processing), so I created a folder called 'ASDF Pixel Sort' on the desktop and added the .pde file to this folder.

It was then simply a question of opening the sketch in Processing, 'loading' the image, setting the image sorting parameters and running the script. After a minute or so the pixel sorted image is automatically added to the directory and displayed on the screen. 

If you want to you can run the sketch again on the glitched file, you just have to remember to update the filename in the sketch, or you can change the direction of the pixel sorting by rotating it in a photo editor before running the sketch. 

The whole process is described quite thoroughly here:

I certainly need to practise the different settings. Leaving the various levels at their female os certainly a bit hit and miss. I have also downloaded Jeff Thompson's pixel sorting sketches, and I look forward to trying these at some stage.

#PixelSorting, #GlitchArt, #Glitch, #DigitalArt, #Abstract, #Databending, #GlitchAesthetic, #PixelArt, #Datamosh, #Glitchy,