Image decoders

During hobby OS development I got the idea to display images of different image compression standards and started to write standalone decoders in C for JPEG, GIF and PNG. This screenshot shows my little OS running under Virtual PC and decoding images. The video mode is set programming S3 Trio registers to 16-bpp, 65536-color mode. A lightbulb PNG image, a spinning Earth GIF-animation from Wikipedia and a JPEG galaxy image:

The idea was to create a stand-alone, re-entrant image decoder library that writes images directly into the linear frame buffer, in different direct-color modes of 15/16/24/32-bit per pixel. With a little header it becomes a standard BMP-file, and this is how all the testing was done during development.

I used some older PCI SVGA video cards with a linear frame buffer, and there were differences what kind of direct-color mode these cards supported with 2D-acceleration. For example S3 ViRGE BitBLT Engine supported 8-, 16- and 24-bpp, while S3 TRIO64 V+ supports 8-, 16- and 32-bpp. To save frame buffer for these cards with 1/2/4 MB and test the GUI part a 16-bpp mode is just fine, just like on this image above.

Sun Jun 17 18:17:38 UTC+0200 2018 © A. Tarpai