I have a perfectly working code that creates 32bpp bitmap and I need to change it so that 8bpp bitmap is created.
Here\'s the piece of code that creates 32bpp bitmap,
You need to specify the size of the palette that you attached. Right now it's zero, so the palette is showing up as the first bunch of pixels in your image.
bmi.bmiHeader.biClrUsed = 256;