jsummers / bmpsuite

A set of Windows BMP image files, for testing purposes
https://entropymine.com/jason/bmpsuite/
GNU General Public License v3.0
56 stars 16 forks source link

Huffman 1D bit order #19

Closed LewisMCYoutube closed 10 months ago

LewisMCYoutube commented 1 year ago

I was surprised this hadn't been tested yet, so I tried opening the two Huffman 1D-compressed BMP files from the suite with OS/2 programs, which, considering the nature of the format, I think is an authoritative source. There's surprisingly lacking support for Huffman-compressed files even among the tools of the era, but from every program I've found that does support them, including the built-in OS/2 image viewer, the correct bit order is msb-first.

Here is pal1huffmsb.bmp, converted to a .gif file with the OS/2 Warp 4.0 image viewer. pal1huffmsb

And this is pal1hufflsb.bmp, converted the same way. pal1hufflsb (That might not load properly with all browsers, so here it is converted to a .tif file from OS/2, and then to a .png file with GIMP:) pal1hufflsb

The shareware image viewer/converter PMView can read them and gives the same output, and can also write them (it's easier to reference, since it has a Windows version). Here's an example of a new 1 bpp Huffman 1D-compressed BMP file written with PMView based on pal8os2v2-16-comp.bmp.

pkasting commented 11 months ago

This is excellent research. Jason, want to update the .html accordingly?

jsummers commented 10 months ago

Resolved in v2.8.