Heavy metal text that says "About bio/social"
Heavy metal text that says "RSS"
glitch tutorial

A Glitch Tutorial: Editing Image Files With Text Editors

I’ve shared a bunch of glitch-art posts on this blog, including this recent list of iOS glitch apps, so I thought it would be cool to share a little tutorial on how to create your own glitch art using an “incorrect editor” technique. For many, glitch art is a technique achieved purely through apps and plugins, but it’s surprisingly easy and fun to create your own glitch art by manually breaking the code.


Animals Within Animals describes the incorrect-editing technique as “editing a file using software/hardware intended for a different form of data”. For the purposes of this tutorial, we’ll be using a text editor to make tweaks to image files. Although it’s basically the same technique, I’m going to break this down into two tutorials. One using a basic text editing program (and a bit of prayer) and the other, which I HIGHLY prefer, using a program called ImageGlitch that lets you see your glitches as they occur. Then at the bottom, I’ll include a few tips.

previewglitch

Method : Text editors
This glitch technique can be done with any computer and requires only requires a simple text editing program like NotePad (for PC) or TextEdit (for Mac).

  1. Find an image you’d like to work with and change the extension to “.txt” (ie “goatse.jpg” would now be “goatse.txt”. If you don’t want to damage the original image file, it’s a good idea to duplicate it before changing the extension.
  2. Open your new .txt file in a text editor (note: the more simple the editor the better, avoid Microsoft Word or advanced editors for best results)
  3. Scroll down a bit and start making a few changes to your file, then save.
  4. Change the extension back to “.jpg” and take a look at your work. This is a trial and error thing, so if you don’t like what you see, keep editing.

Notes:

  • This technique doesn’t allow you do see your changes in real time, so it’s a good idea to save and view your work frequently to get a feel for how your edits are changing the piece.
  • On some computers you can change your .txt file back to .jpg while the text editor is still open… this will allow you to see preview your images after each save without having to constantly switch your extension (see the image above to get an idea of how you can preview your work while editing)
  • Most image files contain vital info at the top of and bottom of the file, so that’s why I recommend scrolling down before making changes.
  • Different size files give very different types of effects. I find that medium size files, around 500 pixels wide, tend to yield more dramatic effects than larger files.
  • Different files yield different results. Try playing with .PSD, .JPG, .GIF, .PNG, and other image files to see the different effects. Be sure to change the extension back to whatever file type it was before you began incorrect editing.
  • OK, maybe it is kind of fun to use rich text editors (like Word)… they tend to do weird things with the formatting, but I suggest starting off with a basic text editor so you can have more control over your tweaks.

Method : ImageGlitch

For this technique you’ll need the ImageGlitch app for your Mac. ImageGlitch is a modified text-editor with a preview window on the side. It allows you to open a file in a text editor and preview any changes you are making to that file in real time.

  1. Open your image using ImageGlitch
  2. Scroll down a bit (maybe halfway down the page) and make a change.
  3. If the image breaks, undo it (duh!).
  4. Try deleting data in some places and adding more data in others.
  5. Save your work when you are done.

Notes:

  • Different files yield different results. Try playing with .PSD, .JPG, .GIF, .PNG, and other image files to see the different effects. I seriously can’t stress how awesome PSD files are for editing (see the image below).
  • For a variety of different effects try saving a file as a different extension as what you started with and then open that new save and edit in ImageGlitch. (ie “goatse.jpg” gets edited and saved as “goatse.gif” which then gets edited and saved as something else)

Examples:

a glitched PSD file: For this file I found that different areas of the text controlled very unique features… I found the area near the middle controlled various RGB settings, so I could move the blue to the left and yellow to the right. Near the very bottom I found I was able to do the more traditional “move everything from this point in the data to the right or left” type thing that you usually do with JPG files.

photoshopglitch

a glitched JPG file: The more traditional type of data bend. I moved the image to the right a bit by adding data, then back left by deleting data, etc. Near the bottom I typed out “0000000 0000000” and then copy/pasted it about 20 times, which created the awesome gradient pattern.

jpgglitch

Cool, that’s it. Now you have a grasp of one of the fundamental databending techniques. Don’t stop there. Try it out with different types of media (audio files in text editors, image files in audio editors, etc). For more details, I highly recommend checking out Animals Within Animals databending primers (from 2005!) and Daniel Temkins’ big list of guides from around the web.

sock-jump-wide-compressor

Comments

18 responses to “A Glitch Tutorial: Editing Image Files With Text Editors

  1. Christine Clarke Avatar
    Christine Clarke

    For Linux users, gedit will not work because it is an ASCII editor; likewise for Windows users, neither Notepad nor WordPad will work, because these are also ASCII editors. The Linux and Windows ASCII editors will try to open the binary encoding of the image in ASCII, but ultimately ends up corrupting the image no matter what you do. Even if you just open the image in gedit/notepad, edit nothing, and save it. It will never open again.

    Since images such as jpg and png are binary files, Linux and Windows users need to download a hex editor (such as Bless for Linux or Frhed for Windows or similar). I have tested both Bless and Frhed to edit/glitch jpgs and they both work great.

    I don’t know anything about the Apple software you are using to edit them, but obviously it is capable of handling files with binary encoding. But I thought you should add some information about this, so that Linux and/or Windows users know to use hex editors.

  2. […] 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 […]

  3. bk Avatar
    bk

    vim – you don’t even have to change to .txt. Highlight the file you’re working on in the finder (there is a mode that will show a preview of the file before you open it) and get your terminal so that you can see the preview. Every time you save (ESC :w) you will immediately see the update!

  4. bk Avatar
    bk

    …vim of course just brings up a bunch of gibberish 🙂 but I wouldn’t know what I was doing anyways so tomato – tomahto

  5. remo Avatar
    remo

    Thank you i have been looking for a reason as to why every single image opened in wordpad or notepad break the file

  6. […] just found a very helpful blog post about how to data bend files on a windows computer. For a while now I’ve been data bending on […]

  7. […] this “Glitch Primer” on editing images with text editors, I began experimenting with ImageGlitch, a nice little […]

  8. The_Snazz Avatar
    The_Snazz

    Thanks for the write up!

  9. […] used Hexels Pro to create the trixel art for my piece, then glitched it out using ImageGlitch (see my tutorial here). I think I spent about 8 hours total on this piece and it turned out awesome. Here’s a speed […]

  10. Nat Avatar
    Nat

    Hey, I couldn’t get mine to work on Windows with WordPad either. I
    downloaded Frhed and opened a JPG and a BMP version and did some random
    typing, saved the file, but I still get the message that both files are corrupted. What am I doing wrong?

  11. Christine Clarke Avatar
    Christine Clarke

    Hrm, it is possible that your random typing was in the part of the file that defines the file type, which would lead to it being corrupted. That is usually a chunk of data at the beginning of the file. Maybe try scrolling down a ways and do some there? Scroll down a long ways, just to be sure.

  12. Sven Elmendorp Avatar
    Sven Elmendorp

    yeeaaah doesnt work. just getting an error everytime i open it

  13. Hwite Debil Avatar

    Dang, it’s not working for me. I tried both a TIF and a JPG. I changed the file extension to txt, then opened it in Notepad, then screwed around with the text, then here I tried two different saving methods: save as a txt file, since that’s what it currently was, then closed Notepad, then changed the file extension back to its original format, then tried opening it in my normal JPG viewer. Corrupted file, doesn’t work. Then the other saving method I tried was after tweaking the text, I clicked “Save as…,” and then saved it from there as a JPG. Same result, it doesn’t work.

  14. DocPop Avatar

    A couple questions:
    Are you Mac or Windows?
    Are you editing files near the middle of the text? If you edit too early or late, you may be breaking the Meta data, which will break the file in bad ways.

  15. Joeru Casey Avatar
    Joeru Casey

    I can’t find the app “imageglitch” anywhere online and the link here is broken. Can anyone offer a link/ alternative?

  16. DocPop Avatar

    Hey Joeru, that link still works for me. https://itunes.apple.com/us/app/imageglitch/id417423725 should take you to the Mac App store, so you can download it on your desktop.

  17. […] Tags:General Research A Glitch Tutorial: Editing Image Files With Text Editors […]

Mentions

Leave a Reply

Your email address will not be published. Required fields are marked *