Take the 2-minute tour ×
Signal Processing Stack Exchange is a question and answer site for practitioners of the art and science of signal, image and video processing. It's 100% free, no registration required.

http://www.google.com/search?q=databending

It is, from what I understand, opening images as audio, applying effects, exporting back as image and voila! glitch-art

Example:
big image
credit

But how does it really work? How/what change in frequencies(?) affect the pixels? It can't be totally random since some of them aren't completely distorted..

How does time(in audio) relate to the dimensions and colors of the image?

share|improve this question

migrated from photo.stackexchange.com Sep 24 '13 at 19:57

This question came from our site for professional, enthusiast and amateur photographers.

    
Neat question, neat technique, but this really isn't the site for it. –  Paul Cezanne Sep 23 '13 at 11:57
add comment

1 Answer 1

up vote 5 down vote accepted

It's pretty simple, really.

Basically, this relies on the fact that the images must be saved in an uncompressed file.

If you think about how an image is stored, it's functionally a bunch of sequential numbers:

(PX 0,0 - R:x, G:y, B:z)
(PX 1,0 - R:x, G:y, B:z)
(PX 2,0 - R:x, G:y, B:z)
(PX 3,0 - R:x, G:y, B:z)
....
(PX 639,0 - R:x, G:y, B:z)
(PX 0,1 - R:x, G:y, B:z)
(PX 1,1 - R:x, G:y, B:z)
....
(PX 639,479 - R:x, G:y, B:z)

For most bitmaps, R, G, B are either 8 or 16 bit values (1 or 2 bytes). Therefore, the "image" is really just a very long sequence of numbers, with some agreed-upon way of mapping those numbers into pixel-positions and colors.

Now, how is an uncompressed audio file represented? Very, very similarly:

(Sample 0 - R:x, L:y)
(Sample 1 - R:x, L:y)
(Sample 2 - R:x, L:y)
(Sample 3 - R:x, L:y)
....
(Sample z-1 - R:x, L:y)
(Sample z - R:x, L:y)

Most audio samples are 16 bit (some are 24, it can vary) per sample. However, again, the audio file is really just a whole bunch of numbers, with a agreed-upon method for translating the sequences of numbers back into an audio stream.

Now that you understand how the files are structured, you can start to see how the audio effects relate to the images. First, since uncompressed images are generally stored in a raster-scanned topology, audio effects are primarily going to have a horizontal "smearing" effect.

Additionally, you can see that basically the effects are going to permute the images based on the effective horizontal frequency components of each horizontal row of pixels.

The "Random EQ" setting boosts some the frequency components of the horizontal edges in the image, and the rippling that surrounds each edge is a function of the impulse-response of the filter.

The "Distortion" image looks to be adding some high-frequency noise, in addition to some apparent posterization, which makes me think it may decimate the internal sample-values in some manner.

The "Bass-Boot" is clearly exaggerating the swings between wide areas of low-values (e.g. black) and high-values (e.g. light colours).

I'm not sure what exactly the phazer is doing (I don't know what it would sound like, so I can't extrapolate to the DSP it involves).

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.