3 ms·
Another one that didn't make it: writing a packed binary file where the first two shorts are the width and height and then just 8 bit grayscale values. That wa
by zwieback 5y ago
Another one that didn't make it: writing a packed binary file where the first two shorts are the width and height and then just 8 bit grayscale values.
That was my favorite way to serialize images but I never had the foresight to add enough header or versioning info to make it backward compatible.
Now after 30+ years of programming the first thing I add to any homebrew file format is enough info to make it extensible.
- bigbillheck 5y agoSounds a lot like a PGM.
- kbelder 5y agoJust store the width. You'll know the height when you're done drawing it, and it saves you two bytes. You never get over learning to program on a system with 3.5k ram.