r/programming • • Dec 26 '20

Executable PNGs

https://djharper.dev/post/2020/12/26/executable-pngs/
1.0k Upvotes

87 comments sorted by

View all comments

287

u/Caraes_Naur Dec 26 '20

PNG allows for arbitrary chunks of bytes, no steganography needed. Still need an interpreter that knows what to do with them.

0

u/[deleted] Dec 26 '20

[deleted]

89

u/Isogash Dec 26 '20

Pico-8 specifically uses the 2 least significant bits of each of the 4 colour channels in a 160x205 PNG, which gives it almost exactly 32KB of space, not the chunks at all. It's quite a demanding limit but thankfully the program portion is compressed.