Editing JPEGs in a Text Editor

Patrick Gillespie made this fun Youtube video showing what happens when you do an objectively silly thing: open JPEGs in a text editor. It’s only six minutes long:

I absolutely love doing crazy things like this. JPEGs are particularly interesting because, once you get past the magic sections that cause it to outright break, and the metadata areas that don’t change the image visibly at all, JPEGs are affected in all kinds of bizarre ways when you change random bytes!

One important take away is to not use Windows Notepad for your image editing adventures, because it’ll change many more bytes than just the ones you want to change, in the name of correcting and regularizing the file, and it’ll practically always result in a non-working image.

Leave a Reply

Your email address will not be published. Required fields are marked *