Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Corrupting images / Making glitch art
#1
A few people were suggesting that I make a tutorial on how to do this, so I decided that I would type one out.
This requires basic knowledge of files, a hex editor, and some patience.


Part One: JPEG Syntax

This tutorial will only be going over the corruption of images in the JPEG format. As far as I'm concerned, you can go fuck yourself if you want to learn how to deal with any other format. With that disclaimer out of the way, it's time to clear up exactly what it means when talking about the syntax of an image. This webpage should contain everything that someone with knowledge of hex editing should need to know and more, but a large amount of it is irrelevant for what we're doing. For now, just keep in mind that there are certain markers in a JPEG file. These two-byte markers are so that your computer can recognize where parts of the file start and end. Don't fuck with them. Directly after each marker, there are another two bytes that indicate exactly how long that segment is. Once again, don't fuck with them. What we will be fucking around with is certain parts of three sections; DQT sections, DHT sections, and the SOF section.

Part Two: The Sections

DQT stands for "define quantization table." These quantization tables essentially determine compression stuff that's highly irrelevant. Just skip three bytes in front of the marker and you can edit anything in the 64 bytes after that to your heart's content.

DHT stands for "define Huffman table." I don't even remember exactly what these things do, but they will fuck up your image hard if you edit them. If you do want to edit the values in these tables, there are a few things you need to know. First off, don't edit anything in the first 19 bytes after the marker. If you can't count to 19, just know that anything after the string of zeros near the marker is okay to edit. Second, don't change the values too much. There's a chance that if you do, the image will end up unopenable. Third, once you get to an FF byte, you've reached the next marker and the huffman table is done. Don't fuck with the markers. Finally, as a rule of thumb, edit the values closer to the end of the tables. This gives a higher chance of letting the image be semi-recognizable.

SOF stands for "start of frame." This section contains all kinds of fun values to mess around with. If you're noticing a pattern, the number of bytes after the marker you don't want to fuck with is a solid three. After that, two bytes determine the image height and two bytes determine the image width. The height is nothing fun to mess around with, but the width can be great fun if you change it around a bit. After that, there's one byte to determine the number of components. You're usually only going to see 01 or 03 for this byte. Each component is three bytes. The first byte of the component is the component ID. Don't touch it. The third byte is the quantization table it relates to. Don't touch it, it does pretty much nothing. The second byte is where things get interesting. These bytes control sampling factors. I don't know what the fuck that really means, but it generally messes up the image pretty bad if you change them to a valid hex value. Because the first four bits control vertical scaling and the last four control horizontal scaling, there's actually only sixteen values you can put in these bytes where the image will still open. The pattern for this can be written as something like [1-4][1-4]. However, none of these are guaranteed to work.

Part Three: Post Corruption

You can do whatever image editing you want with the images now corrupted. Personally, I like to take the end results that I think look best and then fuse them with the original source image. However, the image editing software you use might not accept the file now that it's edited. A quick fix to that is to upload the file to imgur, then redownload it and try again.
Reply
 


Possibly Related Threads...
Thread Author Replies Views Last Post
  Advanced Guide To Making Money (Premium) theCardfather 2 221 08-15-2018, 02:16 PM
Last Post: Deaglaa
  [Free] Learn how people are selling accounts and making money with it $$$ Crusherguzz 1 121 08-06-2018, 10:38 PM
Last Post: justalurker
  New Money Making Method Be Big Ebook padreamin 3 557 05-10-2018, 04:01 PM
Last Post: kenx89
Star Tutorial My (7) strategies to making $x,xxx+/day campaigns chamalitanjawi 1 533 12-03-2017, 02:05 PM
Last Post: geniusforever31
Wink [Making Free Money] GigaBytus 0 552 11-03-2017, 09:31 PM
Last Post: GigaBytus



Users browsing this thread: 1 Guest(s)