Datamosh, pixel sorting and databending explained
Glitch art is not a filter. Each technique reproduces a specific decoder failure, which is why the results look like broken files instead of effects.
Glitch art looks like an accident and almost never is. The recognisable techniques each exploit a particular property of how a decoder works, and knowing which one produces which look is the difference between an effect and a mess.
The unifying requirement is counter-intuitive: enough structure has to survive for the file to still decode. A thoroughly broken file does not glitch. It fails to open, and you see nothing at all.
Databending
The oldest technique, and the simplest. Open a binary file in a program that expects a different format, edit it, and save.
The classic version is opening a BMP or raw image in an audio editor, applying an effect such as echo or reverb to the “samples”, and opening the result as an image again. The audio effect operates on bytes that happen to be pixels, and the visual result is structured rather than random, because audio effects are themselves structured.
The one rule is to avoid touching the header. Corrupt the first bytes and the image simply will not open, which is the failure mode people hit on their first attempt.
Pixel sorting
Take a run of pixels, sort them by some property, write them back. Sorting a row by brightness produces the smeared horizontal bands the technique is known for, popularised by Kim Asendorf’s work around 2010.
What makes it read as a glitch rather than an effect is the thresholding. Sorting every row completely produces something that looks like a gradient study. Sorting only the intervals between pixels above and below a brightness threshold leaves the image recognisable while parts of it melt, and that contrast is the whole point.
Datamoshing
The most misunderstood of the three, and the most specific.
Modern video codecs store few complete frames. An I-frame is a full picture. P-frames and B-frames store only the difference from other frames, expressed largely as motion vectors: instructions to move blocks of the previous picture.
Datamoshing removes I-frames. The decoder, having no fresh picture to reset to, keeps applying motion vectors to whatever it last had. Movement from the new scene is painted using the pixels of the old one, which produces the characteristic bleeding, smearing effect where one scene dissolves into another while motion continues.
The related bloom effect comes from duplicating P-frames, so the same motion is applied repeatedly and the image swells outward.
Neither is corruption in the file-structure sense. The container is intact, the index is valid, and the decoder is doing exactly what it is told. That is why the result plays smoothly rather than failing, and it is the opposite of what happens when the moov atom is destroyed, which produces no picture whatsoever.
Channel desynchronisation
Sampling the red and blue channels at different horizontal offsets from the green gives the fringing associated with broken signals and 3D glasses. It imitates a real hardware failure, channels losing synchronisation, which is why it reads as a fault rather than a colour treatment.
Quantisation and compression artefacts
Crushing the palette into a small number of steps produces the harsh banding of a damaged colour table. Repeatedly saving a JPEG at low quality compounds the block artefacts of the discrete cosine transform until the 8 by 8 grid becomes the subject. Both are the visible signature of a specific compression stage being pushed past its design point.
Doing it deliberately
Each of these is implemented in the meme generator on this site, with a seeded random generator so a given seed reproduces the same result exactly and editing a caption does not reshuffle the pattern.
For the genuinely-broken-file variety rather than the aesthetic one, the image corrupter at Light level leaves the structure intact and scatters entropy through the scan data, which is the closest thing to authentic decoder failure. Standard level and above will not glitch at all; it will simply refuse to open, and if you want to compare the two, the browser-based corrupter makes that a ten-second experiment.
The text equivalent of all this, stacking Unicode combining marks until a line bleeds into its neighbours, works on a completely different mechanism and is covered in how Zalgo text actually works.