Pixel Sorting Test in Processing

I attempted to today to learn some Pixel Sorting since I would like to use my meme archive gathering and arrange in a way that would help visualize new patterns. I need to first collect all of them manually maybe via Illustrator so they keep individually as vectors but then saved as png or jpg to use in this quick test I learned through video tutorial


Screenshot of the step by step learning I copy and tried each part for easy understanding adding my own comments to the original ones for better and future modifications


Test is made with one of the memes collected to use


The code is then re arranging each pixel in the image on the left by hue or brightness, etc and now is going at 100 per pixel, future modifications required when meme collage is made will be acted upon 


Future re arrangements could be done using:


from Tumblr http://ift.tt/2lj9gRO