Press "Enter" to skip to content

Databending Images With Audacity

Databending an image with an audio editor like Audacity achieves very different results than with Text or Hex editors. You can rearrange the waveform with cut and paste or use effects much like photoshop filters. This article will focus on using audio effects.

Here is the starting image.
b1

Databending JPGs doesn’t work very well, they tend to break on export. This image was converted to .BMP then opened in Audacity as Raw Data.
I’ve found that the best import settings for .BMP files is Encoding: A-Law; Byte Order: Little-Endian; Channels: 1 Channel.

Raw import settings
Raw import settings

The file opens and shows an audio interpretation of the data. It’s not a nice sound, I’ll speak more on that in another article.

audactiy_raw_screenshot
Viewing the image as a waveform in Audacity

In the waveform we can identify a short header section then pixels from top left to bottom right. Knowing this we can avoid editing the header (or else file breaks) and edit image pixels horizontally. Manipulating the image in the vertical axis would be extremely tedious. You’d have to figure out a specific pixel location in samples.
With this image’s waveform I was able to identify approximately where the face was between the text. I made a time selection and experimented with effects. It was interesting that the results were somewhat related to the audio processing.

Raw export settings
Raw export settings

To export the image set the file type to “Other uncompressed” and choose RAW (headerless) and A-Law for encoding in options. You have to manually enter the .bmp extension. Ignore the error message.

b16_reverse
Reverse
b17_invert
Invert
b11_chirp
Chirp Generator (sine sweep)
b9_eq1K
Equalizer 15dB boost at 1kHz
b8_eq
Equalizer boosting and cutting randomly
b6_phaser
Phaser
b4_echo
Echo
b18_cut,paste
cut and paste, make sure the file length does not change.

Pretty cool IMO. I like the echo, phaser, and EQ most. I like that you can almost control it but the results are still a little unexpected.

16 Comments

  1. Darren Landrum
    Darren Landrum July 7, 2013

    I tried this a few times, and could not get Audacity to output anything that any of my image viewers/editors could recognize. I’ll keep playing around with it, but if you could provide any more details about your export settings, I’d appreciate it. Thanks!

    • Admin
      Admin July 7, 2013

      Make sure you’re working with .bmp files and A-Law encoding. The header will be the first chunk of the waveform, for safety skip the first few seconds.

      • Darren Landrum
        Darren Landrum July 8, 2013

        Thanks! I got it to work. Leave it up to me to forget there are headers in there.

        One thing I just discovered: you have to be pretty gentle with the effects being applied.

  2. Liam Danger Park
    Liam Danger Park July 7, 2013

    i just get fuzz, static like on a tv. ideas? how do i know if i’m not editing the header?

    • Admin
      Admin July 7, 2013

      The header is the first little bit. Try importing an image that is a solid color and you’ll see it.

      • Liam Danger Park
        Liam Danger Park July 8, 2013

        that worked with the solid colour but with the pictures i’ve tried it’s either all static or normal on top, freaky static part way through and black for about 3/4 of the image. I think i’m following all the directions but it seems i’m tripping up somewhere

        • Admin
          Admin July 8, 2013

          what effects are you trying? I get static adding pink or white noise. you can get errors changing the length of the file.

  3. Chris Anderson
    Chris Anderson July 8, 2013

    One thing you didn’t mention is export it as RAW (headerless) and A-Law encoding. It won’t work if you have AIFF or any other file format selected.

    • Admin
      Admin July 8, 2013

      That’s definitely in there before the example pictures.
      “To export the image set the file type to “Other uncompressed” and choose A-Law for encoding in options. You have to manually enter the .bmp extension. Ignore the error message.”

  4. Chris Anderson
    Chris Anderson July 8, 2013

    Also, you can combine images by silencing the image header on subsequent imports.

    • Admin
      Admin July 8, 2013

      good tip! Didn’t think of that.

  5. Admin
    Admin July 8, 2013

    I updated the post with import and export settings screenshots plus a cut & paste example.

  6. JJ
    JJ July 10, 2013

    See if you can figure out how to do this with short video clips. Time-related effects like the phaser, or a filter sweep would be cool if it worked.

    • Admin
      Admin July 10, 2013

      Videos can be imported with the same import and export settings (or try no endianess). Just importing and exporting will create some glitches and using the effects causes AV sync issues. But it can be done. I need to figure out ideal formats. Alternately there is hex editing and codec hacking to FSU with video.

  7. lance burn
    lance burn September 6, 2013

    Were would I start home recording I have a laptop windows 7, a fender practice amp a android tablet and not a lot of money but I don’t have a clue were to start or what to buy also I have a zoom four track portable studio, I have no idea what to do what connects to what and how can anyone help sort that outme head is in bits trying there must be something iI’m missing and I have no idea what its been about fourth years since I recorded anything and that was on a reel to reel tape

Leave a Reply