Floyd-Steinberg Stripes

October 2021 - Current

The Floyd-Steinberg method of dithering images down to 1-bit black and white brings back fond memories of Hypercard running on System 6, or perhaps it was early System 7. Games, as well as productivity applications, made good use of it, as did I when I was playing around making loading screens and 4-character sprites on the Spectrum.

Here, I put carefully chosen values from the Calyxia algorithm through a simple Floyd-Steinberg dither, based on the algorithm thoughtfully described by Wikipedia. Some alterations have to take place as I tend to code with a HSB color model but I wanted black and white. Running through the pixel array making everything greyscale was a little tough on the processor, so I cut some corners by temporarily re-coding Calyxia to an RGB model and simply averaging all three. There's probably a better way, but it can wait for an idle moment when I feel like refactoring things.