Glitching in Processing

Some more stuff from my Glitch class, which ends next week. :/  My impression of the class is that, though most people (including, perhaps, my professors) may believe glitch-alike and glitch aesthetic are passing fads that move way too fast in the transition to some future styles of art, that Glitch is some of the most fascinating artwork I’ve seen in a long, long time.  I never really want to see any more old paintings of Christian-themed stuff, nor the post-modern Christian-themed shock art, and painting and drawing and sculpture are sort of done with, with hipsterish 8-bit and old video game-style art being too nostalgic from people who are still too young.  In terms of artists pushing boundaries, criticizing the system, and making a commentary on society, it’s hard to think of a better place for art than a world where people are learning how things work, then reprogramming them to either subvert the original intent or to distort it in a way which undermines the rigidity and order of large, interconnected, imposing data/network/bureaucratic systems.

Anyway.  In our last assignment, we all had to create an algorithm in Processing which could be used to distort an image, so that we could all put our algorithms together and output the results next to each other for comparison.

For my algo, I took Kyle McDonald’s algo which broke out an image into a grid of pixels.  Then I figured I could weave in another image by using modulus (%) arithmetic, an easy programming trick, to intersperse pixels at specific places into the canvas.  Then I also decided to take the original image’s pixels and map it on upside-down onto the image.  The original:

The result:

The algo:

PImage vt520_1(PImage img) {
  PImage img2 = loadImage("flag.jpg");
  int n = img.width * img.height;
  for (int j = 0; j < n; j++) {
    color cur = img.pixels[j];
    color cur2 = img2.pixels[j];
    int r = int(red(cur)), g = int(green(cur)), b = int(blue(cur));
    int off = j*10&(j>>20)|j*3&(j*5>>15); // miiro
    off %= 256; // don't let the offset overflow
    if (j%2==0) {
    img.pixels[j] = color(0, 0, g^off, 0);
    else if (j%3==0 || j%7==0) {
      img.pixels[j] = cur2;
    else  {
      img.pixels[n-j-1] = color(r^off, 0, 0);

  return img;

Interestingly, because I was using modulus arithmetic, this resulted in the image changing in some applications because of the way they scale images down to certain sizes.  Some other views of the image:

Should have an image of all the algos working together at some point soon…  Classmates came up with some pretty amazing stuff!



Then our in-class assignment was to go out on the cloud and try to break services or get banned.  I liked this trick on Facebook by Hanna Kang-Brown, just using extended characters: