Ordered dithering may match what Windows does in 16 bit mode, to recreate that look, but you can't call it "period appropriate", given that Floyd-Steinberg was published in 1976, well before the first line of Windows was written (and just three years after Bayer).
I call ordered dithering "period-appropriate" because it is what software and hardware implemented at the time for real-time dithering. I don't mean to imply other dithering algorithms hadn't been invented. Did any other reader interpret it like that?
Edit: Rather than wait for replies, I went ahead and changed the phrasing anyway. Thanks!
Curious: is the significant palette shift purely a byproduct of the limited bits per color? Or is that somehow baked into the high color format? For example the anime image gets much bluer than I would have expected. Is that a tunable parameter or just how well you can possibly do within the constraints of the format?
You can absolutely make hi-color images which are close to visually indistinguishable from the 24 bit originals, by using a good dither matrix. GdkRgb did this well over 20 years ago, back when "CRT" meant a display technology, and the fuzziness made the dither patterns melt.
If you were doing it really carefully, you'd use a corrective gamma function, as dithering in a nonlinear colorspace is not an identity transfer function. Alternatively, you can do error diffusion in a linear space. But at 5 bits, the effect is fairly subtle.
The palette shift is an artifact of the current dithering (quantization) algorithm [1]. It becomes visible when you apply quantization a few times to the same image. (50 in the example. I've updated the image and replaced the "After" label with "Gen 50" to make this more obvious.) It won't be too visible to the human eye after a single quantization pass.
Edit: The result of a single pass for the anime image looks like this: https://i.imgur.com/dTmzRwF.png. I've changed "visible" to "too visible" above, because the image is visibly a little brighter.
Wasn’t dithering only visible in Windows when using 256-color mode? Bonus for switching apps and having to wait that fraction of a second when the palette was swapped, so you’d possibly see the program you just alt-tabbed to in radically different colors.
I think Windows never applied whole-screen dithering on the desktop in 16-bit color mode. Some UI elements, applications, and games, however, did their own dithering. (Maybe in Direct3D and OpenGL it was up to the graphics card drivers? I am not sure. I couldn't confirm or refute this with a quick search.) As an example from Windows itself, I switched a Windows 2000 VM to high color, and the gradients in the window title bars became dithered.
Yes, but the author is most likely using a Win API that is known to exist since that operating system & service pack. I doubt they tested every version, unless they are the curious type :)
I did test it! I had no VM with Windows 98 SE already installed, so instead I used someone's "Windows 98 Live CD" from the Internet Archive. I integrated hicolor.exe and some test pictures into the ISO with ISO Master and booted qemu-system-i386 from it. The program passed manual testing. I realized I could automate the ISO mastering with a shell script and the actual testing with a BAT file to create a Windows 9x approximation of fresh-VM CI without messing with HDD snapshots, but (somehow!) decided not to. I don't think I will be integrating Windows 98 SE or Windows 2000 into the CI pipeline, so support for either may break.
Neat. Are you going to apply Floyd-Steinberg to moving images? It is good for still pictures, but I wouldn't use it for real-time graphics unless I was deliberately going for a "jittery" effect. Consider a spatially stable dither like Bayer's or https://pippin.gimp.org/a_dither/ instead.
Good to know! I hadn't thought that far. This is a pretty low-power computer, so video hasn't been a priority.. I think I'm going to shoot to render internet in a box corpuses. Wikipedia, Gutenberg, stuff like that.
->Converted to indexed (or modify palette), select amount of bits.
-> select palette algorithm and dithering (mtpaint has option for small palettes)
-> save
22 comments
[ 5.1 ms ] story [ 60.5 ms ] threadEdit: Rather than wait for replies, I went ahead and changed the phrasing anyway. Thanks!
more than one thing can be period-appropriate.
If you were doing it really carefully, you'd use a corrective gamma function, as dithering in a nonlinear colorspace is not an identity transfer function. Alternatively, you can do error diffusion in a linear space. But at 5 bits, the effect is fairly subtle.
Edit: The result of a single pass for the anime image looks like this: https://i.imgur.com/dTmzRwF.png. I've changed "visible" to "too visible" above, because the image is visibly a little brighter.
[1] https://github.com/dbohdan/hicolor/blob/f00eac41417b0e989e1e...
https://www.chrismcovell.com/psxdither.html
I think Windows never applied whole-screen dithering on the desktop in 16-bit color mode. Some UI elements, applications, and games, however, did their own dithering. (Maybe in Direct3D and OpenGL it was up to the graphics card drivers? I am not sure. I couldn't confirm or refute this with a quick search.) As an example from Windows itself, I switched a Windows 2000 VM to high color, and the gradients in the window title bars became dithered.
https://i.imgur.com/jrzdcNq.png (top is 32-bit color, bottom is 16-bit)
I should have color in a few hours.
Hello, fellow traveler! I'm using Floyd-Steinberg and don't depend on C (either directly or indirectly)
->Converted to indexed (or modify palette), select amount of bits. -> select palette algorithm and dithering (mtpaint has option for small palettes) -> save