back to the encoder itself, I added some automata to convert the image size and count the cbSize (roughly).
I also looked into what the extra fields right after this one do; unsurprisingly, most of them are special attributes, and at least one seems to be unused. Setting all of them to 0xffffffff results in this hilarious outcome:
/dev/stdin: PC bitmap, Windows 3.x format, 32 x 32 x 4, 4294967295 compression, image size 4294967295, resolution -1 x -1 px/m, 4294967295 important colors, cbSize 1024, bits offset 120I especially like the “4294967295 important colors”, reads like a line from the BORN TO DIE template