What is “Databending”?

Databending is a method for producing glitch art by using software intended for one media format, and using it for others. In doing so, you can achieve cool effects with minimal effort and knowledge. While there are many ways of achieving this (and many others for creating glitch art outside of databending), we’ll take a look at a simple and accessible way of doing it with the free, cross-platform, open source audio editing software Audacity.

First, though, let’s take a look at some of the effects you can achieve!

Original image After applying an echo filter After applying a noise reduction filter After applying reverb After pitching up the image After applying a phaser filter After after applying multiple effects After after applying multiple effects
Examples of some of the many effects possible via databending

You can create glitch art simply by using these techniques, or combine them with traditional image editors to combine them into even more unique pieces!

Getting our image into Audacity

Before we begin making modifications, first we need to get our image into Audacity. Take your image, and save it as a bitmap (.bmp) file. You could potentially use other image formates, but BMP works especially well due to:

  • Predictable header length When we import our image in, we must be careful not to modify the header that defines the size of the image, its color space, and other metadata. BMP files have a header size of 14 bytes positioned at the beginning of the file, which is easy enough to avoid!
  • Simple file encoding BMP files are formatted as a pixel array, with each element of the array describing one pixel’s color value. When we apply different effects, this is ideal as each pixel could be modified individually if we wished.
  • Wide support You can create a BMP from most any image with the built-in image editing software on your computer.

Importing

After we have converted our file to a BMP, we’ll need to import it into Audacity. In a new Audacity project, go into the File menu, followed by Import > Raw Data. Open your bitmap image and you’ll be presented with an “Import Raw Data” window. In here, change your Encoding to either “U-Law” or “A-Law” and note down which one you chose. Both work equally well, but you’ll need to use the same encoding for both the Import and Export process or the resulting image will be corrupted.

You can also choose how many “tracks” you’d like to import the image as. Each additional track divides the image’s rows between them. For instance, if you import it as stereo, the left and right channels will take “every other” row. In essence, your left channel would get all odd-numbered rows while the right would get all even-numbered rows. 3 tracks would result in each having every third row, and so on. If you aren’t looking to do effects on individual rows (and instead on the image as a whole) then it is suggested to import it as mono.

Click ok and you’ll see your image imported as a waveform. It’s at this time that it would be a good idea to duplicate the track, and rename one to “backup” in case you need you pull the header information from it later.

Our starting image we'll be making modifications to Import our image via the File > Import > Raw Data menu Import our file with U-Law encoding as a single track Duplicate the waveform, rename it to backup, and mute it.
Demonstration of importing the image into Audacity.

Databending our image

Finally, we can start making art! At this point, we can start clipping, editing, and running filters on the image, so long as we don’t modify the file header. In most cases, if you avoid modifying the first 0.25 seconds of the waveform, you’ll avoid breaking the file. If you do make such a mistake, copy the first 0.25s from the backup we had made. You can try different effects by selecting a portion of the waveform, and then applying a filter from the Effect menu. For the sake of demonstration, let’s apply the Phaser effect.

Once we’ve finished applying our modifications, we can export the image!

Find the phaser effect in the Effects menu Change the settings and apply the effect. Play around with it!!
Applying effects to our imported image

Exporting our image

Just like before, we’re going to go into the File menu, but this time we’ll click Export Audio. Rename your file to something new with the .bmp extension, and choose Other uncompressed files in the Save as type dropdown. In the options at the bottom, set your Header to RAW (header-less), and choose the Encoding that you imported the file as earlier. Click save, and your image will be exported to the specified file. Open it up and check it out!!

Find the Export Audio option in the File menu Export our image using the same U-Law encoding we imported with Take a look at the image we modified!
Exporting our image back to BMP format

Next Steps and Ideas

Now that you’ve learned this technique, play around a bit with other effects! Some suggested ideas include:

  1. Find out what happens when you fade different parts in or out
  2. Try your hand at importing the image as multiple tracks, and modifying each track differently!
  3. Use software like Photoshop to composite your databent pictures with others, or to combine multiple images built from the same source.

Once you are feeling confident in this technique, try the following:

  1. Using software like Photoshop, GIMP, or ImageMagick, try splitting an image into three images, one for the red, blue, and green color channels. Apply effects on each channel individually, and then combine them again in your chosen software.
  2. Using ffmpeg or virtualdub, split a video into individual frames. Apply effects on these frames, and then combine them into a video again!

As you can see, this technique is a great jumping off point for new pieces, or tool to add a bit ~more~ to an existing piece. Give it a try and show me what you come up with on Twitter at @momosoftjesse

Updated: