Glitch Art for Windows and Linux

Doc wrote up a pretty good Glitch Primer which was, unfortunately, really only applicable to Macs. So here is my write-up on glitch art for the rest of us!


Image files are encoded in binary, whereas most text files are in Unicode, so your basic text editor on your Windows or Linux computer is going to try and translate the binary into ASCII, with horrendous file-corrupting results (even if you just open the image in your text editor, make no changes, and save it; it will be corrupt, in addition to never being an image again). Oh Notepad and GEdit will try to open your .png, oh yes they will try. Notepad will open it and pretend like it did it correctly and hope for your approval as it silently corrupts your image, whereas GEdit will actually have the good sense to say, “Hey, WTF is this encoded with? This doesn’t make any sense and you will only end up corrupting your file if you continue.” But either way, you’re not getting any glitches out of those text editors.

You won’t get around the fact that you’re going to need a hex editor if you want to glitch those binary files without destroying them. Mayhaps you already have one on your computer, from those days you spent editing your save files to cheat enhance your PC gaming experience. If not, then I can recommend something like Frhed  or Bless.

Once you have your hex editor of choice, go ahead and open any old image file. No need to change the extension, the hex editor has seen it all. It will probably look something like this:

Oh the saved game files I have edited in my day
Oh the saved game files I have edited in my day

The numbers in the far left-hand field are sort of like line numbers, to help you keep track of where you are in the file. Those aren’t editable. However they are in hex, so that is why they don’t look like ordinary decimal line numbers. If you are super curious to know what those numbers would be in decimal, and you don’t want to do the calculations yourself, you can use any number of hex conversion calculators. The way I made the GIF on the top of this post was saving several different versions of the image, where I glitched the exact same spot each time. I used those numbers on the left to make sure of this. Thus, I got three similar-but-different glitches. I think I changed a 66 to 22, 2e, and ee. Or something like that.

Unlike editing saved game files, you don’t really need to convert back and fourth between hex and decimal to make sure everything is done correctly (“OK, so how do I write ‘level 99’ in hex? How about a Str of 10?”). Done correctly is the opposite of the point in glitch art. But it might help to have a passing familiarity with how hex is written, and what their decimal counterparts might be. It uses letters to represent some numbers, because our numbering system is inherently decimal, and therefore it won’t do to just use those. Basically, 0 – 9 are the same while a – f are 10 – 15. But it is no big deal if you don’t like or understand non-base-10 numbering. As I mentioned, the comprehension required to glitch images is fairly minimal.

You might notice that the beginning and end of the file look a bit different from the middle. That is because they don’t encode the image, they encode things like what sort of file it is, what the thumbnail should look like, etc. For this reason, it is best to just edit the middle (otherwise you’re just going to corrupt that file all over again, and your hex editor would be for naught). You can get an idea of how far along the image you are, by where the glitches appear, and adjust accordingly.

Now you just go nuts. You can copy/cut and paste/insert large chunks of the file into other places in the same file; you can also copy from one file and paste into another file; you can change a ton of lines to just say ee ee ee ee ee ee ee ee ee ee ee ee ee ee ee ee ee ee ee ee ee ee ee; really whatever you want.

Glitched Doc: Dark

I also found this guide on how your image’s initial save settings can affect your glitches to be really helpful. That is how I made these glitches in this image:

Glitched Doc: RAINBOWS!

I specifically wanted rainbows, and I got rainbows. My work here is done.

To be honest, even if you are a Mac user, you should probably consider getting a hex editor to do your glitches. I don’t know what is going on with the open-images-with-the-Mac-text-editor deal, but my guess is that the Mac text editor is able to convert the binary into ASCII in such a way that, when you save it back to binary, it can somehow convert the ASCII back to binary in the… exact… same… way? Whatever the case, I think using a hex editor is much more informative and intuitive than using the Mac text editor. But Windows and Linux users don’t even get the option, so hopefully this has cleared up any confusion as to why your text editor is only capable of corrupting your files and not making beautiful glitch art.