15 ms·
JPEG image glitching / corruption
- mmastrac 13y agoThis is a blast to play with.
- sitharus 13y agoThat's actually pretty nifty, and shows what a little bit of corruption does to an image. Hopefully more systems will start shipping with checksumming file systems by default. Even better if they have error correction. I still have some of the first MP3s I ripped back in the late 90s. They still play, but it sounds like a scratched CD. HDDs aren't as robust as we'd like to think.
- baddox 13y agoHave you had those MP3s on the same disk since the 90s? That would be the only practical way that bits would flip.
- sitharus 13y agoThey've been across about 4 different disks. I copy using SCP, so it's unlikely that the corruption happened over the network, most likely it was between the CPU and disk as it was being read/written.
- sixothree 13y agoAnother possibility is that the encoding program did something slightly non-standard which is no longer recognized by modern decoders?
- sitharus 13y agoIt's possible, but I'd expect modern decoders to be more resilient to out of spec files. I'd share them, but copyright and all that.
- Amadou 13y agoA couple of things you could do. Get an mp3 error checker and see if it has anything to say about the particular files. You also might want to grab EncSpot Pro (free, for windows) to figure out exactly what codec you used. Chances are that if the codec was buggy, then it's been documented such a google search on the specific codec and version will probably turn up people talking about the known errors.
- vitovito 13y agoJPEG actually support self-repair: when you save out a JPEG, you can insert "restart markers" every so often, which basically repeat the original headers and allows a decoder to recover from any corruption. If you put enough restart markers in an image, you can swap or replace the compressed blocks between any given sets of restart markers in the same image without glitching it.
- voltagex_ 13y agoThis won't help you now, but you could also keep parity files (PAR2 et. al) on a separate disk/media in case of corruption.
- electic 13y agoProbably can take this to the next level and make a cool effect with javascript such as a noise effect.
- MasterScrat 13y agoOr play this along some electro music, and adjust the glitch settings based on the sound levels...
- awhitty 13y agoThis sounds like an awesome afternoon project!
- nitrogen 13y agoI've always wanted to create something like this as a video editing effect plugin. Very cool.
- sixothree 13y agoCheck out music video Chairlift - Evident Utensil. I don't feel like they took advantage of the effect in any meaningful way in this video though. I also seem to remember another one with a similar effect.
- nitrogen 13y agoLooks like applying the motion vectors from one video to the starting conditions from another, which sometimes happens when fast forwarding with a buggy video decoder or a glitchy video. I wonder, could you do this just by chopping I frames from one video with B and P frames from another?
- duskwuff 13y agoThat (removing I-frames) is exactly what they were doing - the technique's called datamoshing.
- caf 13y agoAlso the music video for Philadelphia Grand Jury - Save Our Town, where the video gradually degrades over the song (although this one uses analogue degradation).
- AdamTReineke 13y agoI want something that can do the opposite of this. I have a bunch of old photos that are messed up where the bottom half is pink or offset or something else. I just haven't had the time to dig into the spec to figure out how to undo it.
- wolf550e 13y agoIt's just a huffman code. When you encounter an undecodable sequence of bits you can skip bits until you find the next symbol (i.e. the stream is decodable starting from current position + X bits), then just guess which symbol it was that you skipped. The symbols are a run length encoding of quantized zigzaged DCT coefficients of (usually) 4:2:0 YCbCr. Wikipedia has details and the spec is readable.
- Houshalter 13y agoThis is interesting in terms of information theory. When you compress information you are basically figuring out the pattern behind something, and encoding that pattern instead of the entire image. For example, PNG which assumes that pixels are more likely to be the same or similar to the pixels above or to the left of them. So you only have to encode how much difference each pixel has to it's neighbors, rather than the entire value of every pixel. If you were to randomly corrupt a highly redundant format, like a bitmap, it would just change a few pixels. On more compressed formats like JPEG it seems to affect the entire image, and in very specific ways (mainly the color of every block of pixels after the point that was corrupted.) If you corrupted a perfectly compressed image, it would give you a different image entirely, possibly of something very similar. I.e. if you had a image format very good at compressing faces, corrupting it would result in a different face entirely, not randomly misplaced pixels or colors. And the face would be similar to the original, maybe with stuff like a different nose type, or an extra freckle. The corruption is revealing what kinds of assumptions it is making about the content.
- underwater 13y agoThat's similar to how Xerox copiers were switching numbers -- http://www.theregister.co.uk/2013/08/06/xerox_copier_flaw_means_dodgy_numbers_and_dangerous_designs/ http://www.theregister.co.uk/2013/08/06/xerox_copier_flaw_me... Though that was due to overly aggressive compression instead of corruption.
- reginaldo 13y agoNot just Xerox, btw... My HP printer/scanner does the same. After reading that post I started paying attention and eventually saw the effect a few times. I just wonder how many copies with the wrong numbers I've produced so far...
- theon144 13y agoI never thought about it that way, thank you! It makes me wonder what audio format could be fun to corrupt this way. FLAC, maybe?
- skmp 13y agohah! http://glitcher.korny.cc/ http://glitcher.korny.cc/ -- i made this a couple of days ago as well :p
- cz20xx 13y agoMy method for doing this involves writing gibberish into or deleting content from a jpeg opened in HexFiend http://ridiculousfish.com/hexfiend/ http://ridiculousfish.com/hexfiend/ It's very trial and error, but the results can be fun when you screenshot each progressive glitch and then gif them together to get stuff like this: http://24.media.tumblr.com/4d77ff1ee75c119a03cac1eb90952505/tumblr_mm6z85Xi841rszypmo1_400.gif http://24.media.tumblr.com/4d77ff1ee75c119a03cac1eb90952505/... Neat that someone automated the process, though.
- jamesbritt 13y agoAfter a fair amount of trial-and-error hand editing I devised a simple Ruby script to auto-glitch. https://gist.github.com/Neurogami/6208325 https://gist.github.com/Neurogami/6208325 Later I combined this with another script to gather up the generated images and create an animated GIF. An example: https://plus.google.com/107781042718674753240/posts/icwnoyHYNTE https://plus.google.com/107781042718674753240/posts/icwnoyHY...
- cz20xx 13y agoVery cool! Going to check this out.
- yuhong 13y agoHxD lets you fill bytes with random data, making it an easy way to fuzz files.
- Amadou 13y agoAnyone got a jpeg un-glitcher? I'm thinking of a tool to fix these sorts of minor corruptions in the jpeg bitstream. The tool would load up the corrupt image, let the user visually select where the glitch starts by clicking the first "weird" looking pixel and then iterate through different values until the user says the picture looks better. Rinse and repeat.
- afhof 13y agoIts doubtful that the image can be recovered. The information really is gone. I suspect it would be easier to make it simple to have redundant copies of the data, rather than trying to fix the images after they're gone.
- nitrogen 13y agoIf it's only a single bit that's toggled, you can just iterate through all the bits until you find one that fixes the image after you flip it.
- JosephRedfern 13y agoFor a 1MB JPEG, that'd be over 8 million different images.
- nitrogen 13y agoIf you could point to a region of the image where the corruption begins, you would reduce the number of possible images significantly.
- porges 13y agoThat sounds plausible. Another idea: choose a section of "bad image" and a section of "good image" which should have similar colours and then generate mutations of the corrupted DCT square until you have a close match between the two areas.
- 13y ago
- quasque 13y agoNice concept and experiment! In a similar vein, reminds me of this curious JPEG glitch http://stackoverflow.com/questions/3937885/cross-browser-incompatibilities-in-decoding-jpeg-files http://stackoverflow.com/questions/3937885/cross-browser-inc...
- Erwin 13y agoHere's a subreddit dedicated to producing (or locating) interested corrupted images: http://www.reddit.com/r/glitch_art/ http://www.reddit.com/r/glitch_art/
- runn1ng 13y agoApparently, there is a subreddit for everything. (Actually, now I remember there was a subreddit for pictures of dead children. I don't know if it's still up.) edit: oh yeah, it's still up. http://www.reddit.com/r/PicsOfDeadKids http://www.reddit.com/r/PicsOfDeadKids
- kalleboo 13y agoAlso http://www.reddit.com/r/brokengifs http://www.reddit.com/r/brokengifs
- jere 13y agoThis is so cool. The really surprising part to me is that sometimes the glitch is much more noticeable when you increase the quality.
- paulnechifor 13y agoWhile on the subject of JPEG in JavaScript, I made a web page[1] to repeatedly encode an image in order to bring out the artifacts. (Works “best” on text.) [1] http://minimul.ro/enricher http://minimul.ro/enricher
- ygra 13y agoThis cheats a little by shaking the image, though. Without that you're hitting a fixed point much earlier, with less dramatic results.
- paulnechifor 13y agoI don't call it cheating... I call it simulation of the effects of cropping. But seriously though, I was quite was surprised by how little is lost if you repeatedly encode the same image. Then again, it makes a lot of sense if you look at how blocks are encoded.
- ygra 13y agoThere was a nice article about that: http://www.hackerfactor.com/blog/index.php?/archives/355-How-I-Met-Your-Mother-Through-Photoshop.html http://www.hackerfactor.com/blog/index.php?/archives/355-How... Turns out, not every JPEG encoder is identical in that regard and Photoshop destroys more than others.
- pushmatrix 13y agoI did the same thing with video over here: https://news.ycombinator.com/item?id=6350463 https://news.ycombinator.com/item?id=6350463
- ffog 13y agohttp://asdf.us/imbreak/ http://asdf.us/imbreak/
- antimora 13y agoThis is a cool movie effect in scenes with poor telecommunication is projected.
- teamonkey 13y agoThis technique is often used as a puzzle in ARGs[1]. It reminds me especially of I Love Bees[2]. Bits of plaintext data were added to jpgs on a supposedly-corrupted website[3], which then had to be combined in the correct order. As well as fitting the theme of the game, it's a good puzzle since the corruption gives a huge visual clue to investigate the image and it's relatively easy for anyone to load it up in notepad and find the 'hidden' data. [1] http://en.wikipedia.org/wiki/Alternate_reality_game http://en.wikipedia.org/wiki/Alternate_reality_game [2] http://www.wonderweasels.org/apiary/guide.htm http://www.wonderweasels.org/apiary/guide.htm [3] http://www.wonderweasels.org/apiary/guide1b.htm#killer http://www.wonderweasels.org/apiary/guide1b.htm#killer
- Viper007Bond 13y agoYou can find lots of great looking ones here: http://www.reddit.com/r/glitch_art http://www.reddit.com/r/glitch_art
- lectrick 13y agoMy first thought was "oh, this could be used for art" (I recall Trent Reznor used to route music through broken speakers to get a certain effect)
- kulesh 13y agoWhen I arrived to New Zealand, from a trip to US (California mostly), my hard disk turned to be damaged. I managed to restore only a small part of photos. Only less than 10 % photos turned out to be unaffected by a specific digital effect (it is clearly seen in the post). In the beginning I got upset (that is why I did not post that long) but after, perhaps, the tenth view of the half-damaged photo archive I started to notice interesting frames. http://travelwithacam.com/glitchy-san-francisco http://travelwithacam.com/glitchy-san-francisco http://travelwithacam.com/glitchy-death-valley http://travelwithacam.com/glitchy-death-valley
- glitch_hipster 13y agoFuck you for making this, I'm serious. You ruined my pseudo-art tumblr now.
- tripzilch 13y agoIt is sickening. You may now feel entitled to rage about hacker privilege misappropriating glitch culture and the injustices against those without the choice of unbiased data that have to make do with corruption, a reality with no digital integrity net to fall back on, when you need bits to be determinate or a file "format" that stops being forgiving just when you need it most. There is an invisible underlying source of so-called "malfunctions", yet the author of this tool, emphasizes a convenient transformation/generation of "error typical" data and contrasts it against subjective compliance with a file "format", projecting a rigid labelling, totally side-stepping these issues and the subsequent injustices.
- Mutjake 13y agoNice :-) One can do something akin to this by using Radamsa -- https://code.google.com/p/ouspg/wiki/Radamsa https://code.google.com/p/ouspg/wiki/Radamsa (shameless plug) -- to fuzz bitmaps. Similar imagery is common when fuzzing browsers with image-containing samples and can be quite mesmerizing to observe. Fuzzing other media formats (such as MIDI or audio files) can also yield "interesting" results.