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 my friend's uncle's oriental shorthairs.
The previous image, but with an echo effect applied.

When I was younger, I would use Audacity to make these effects. You can import a bitmap file as raw data, apply an audio effect to it, and export the data back to a bitmap. This process is tricky and error-prone. You have to be careful not to mess up 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 just had to type:

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 around 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.

If you want to play with this yourself, here's my code on GitHub. Let me know if you have trouble using it.

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.)