There are lots of questions (and answers) here and elsewhere about calculating stride. I've got some bitmaps that I need to read into memory. Everything works fine IFF they are 16.5 million colors (24 bit). However, I only need them to be 256 color (8 bit) and when I tried to load in the exact image, but with a lower color depth, it blows up. I could just live with this; except that, obviously, a 256 color image is a lot smaller than a 16.5 million color image.
So, what is the stride for a 256 color gray scale (8 bit) image?