In memory, a bitmap string is often stored in the format BBGGRR00BBGGRR00BBGGRR00 ... so that each pixel will occupy exactly four bytes or 32 bits. This simplifies many things and speeds up computation and image manipulation. But if the bitmap indicates the intensity of red, green and blue in the form of bytes (in the range 0..255) and does not contain an alpha channel, then for each pixel only three bytes are required. So there is a fourth unused byte per pixel. And in the pixel structure it needs to be called something. Given that the members used are called rgbRed , rgbGreen and rgbBlue , rgbReserved feels pretty good. rgbUnused be even more appropriate, but in Win32 there is a tradition of calling (currently) unused parameters "Reserved" as in "reserved for future use." In fact, if the application works with transparent bitmaps containing an alpha channel, each pixel can be BBGGRRAA, so you can use rgbReserved as rgbAlpha .
The last part of your question cannot be answered in its current form. I have no idea why your code is not working. Maybe the pixel intensity is full? Maybe there is some kind of stupid mistake?
As a final note: if you are interested in which member of the Win32 structure, you can always refer to the official documentation .
source share