Whats BITMAP.bmBits format? As I understand BGR but with some aligns (differs from size?). Please explain how this aligns work and how convert bitmap to RGBA without aligns (empty space) properly? Thanks in advance.
Whats BITMAP.bmBits format? As I understand BGR but with some aligns (differs from size?).
Share
It depends on the values of the rest of the structure. See the MSDN articles on
CreateBitmap()andBITMAPINFOHEADER.biBitCountfor the details.Each scan line (row of pixels) must be DWORD aligned with the padding calculated using somethign along the lines of:
Other examples available.
32-bit per pixel data is already DWORD aligned.