I asked a question on StackOverflow, but will probably get a faster response here. I want to create a BMP file with 8 bits per pixel. I use file Properties > Details to verify the result. If Bit depth is 8 there then I got my picture. This is code that I have:
EDIT: Actually, I do write it, but only to verify that it's 8 bits per pixel. I use WriteAllBytes for this. I'll remove this when I get a proper BMP file in memory.
Got the answer in the other place. Quote from there: "Windows Explorer displays all compressed BMP files as 32-bit contrary to their actual bit depths." Let's call it a bug. If one really wants to see 8 bits depth in file properties they should add the following line before the call to ToByteArray: