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.

40th Anniversary of the ZX Spectrum

“What do you want from us? We’re evil! EVIL!”

Lee Reilly on The GitHub Blog offers a long post about the ZX Spectrum on the occasion of the 40th anniversary of its release. Wait, 40th anniversary? (does some math) That puts it in early 1982, the year of Donkey Kong!

To give to some incentive to click through, some of the projects linked are:

  • A Spectrum emulator written in Rust, and another one in JavaScript
  • A port of Spectrum game The Great Escape to C and current platforms
  • Tools for working with archives of Spectrum cassette tape images, including to convert one to mp3 to facilitate transferring to a tape for play on a physical ZX Spectrum
  • A Visual Studio Code extension for working with Z80 code
  • And small program to convert image files to the peculiar limitations of the Spectrum’s graphics hardware, to give your portraits some of that loading screen flair.

That last one I tested out a bit, here’s some results. I discovered it’s best if you resize the images to around the Speccy’s 256×192 resolution before processing.

Richard Speed of The Register also wrote a nice rundown on the ZX Spectrum’s history.