Sockbend

Databending is manipulating files as if they were of a different format. For example, you can use an audio or text editor to manipulate a bitmap file, causing glitchy effects in the image.

Photo of a friend's uncle's oriental shorthairs.
The previous image, but with an echo effect applied.

When I was younger, I used Audacity to make these effects. You import a bitmap file as raw data, apply an audio effect to it, and export the data back to a bitmap. This is tricky and error-prone. You have to be careful not to corrupt the BMP header at the beginning, or your file will be unreadable. (You can just leave the first millisecond or so of audio alone, but then you'll have an unaltered stripe at the bottom of your databent image.) You also have to be careful not to shorten the file, or it probably won't display.

To streamline the process, I made Sockbend, a set of Python scripts that applies audio transformations to images. To make the above image, I typed:

b = sockbend.Bender("rats.jpg")
b.bend(
    [("echo", {"delays":[0.5], "decays":[1]})],
    out_path="rats_echo.png"
)

It's a lot easier this way to fiddle with the numbers until you find something that looks nice. I also added options for image masks and animations, so you can make cool GIFs with it too.

Photo of trans pride socks I found on Sockdreams.
The previous image, but with a varying-frequency allpass filter applied with an image mask.

To play with this yourself, find my code on GitHub, or try this online demo made by my friend Nova.

Image Gallery

Here's a collection of some cool databent images.
(To show flashing GIFs that might be harmful to those with photosensitive epilepsy, click here.)