convert bitmap to byte array
Question
How can I convert a bitmap to a byte array in c++ WITHOUT the .net framework?
Solution
If you’re using Windows, you can use GetDIBits
to retrieve the bitmap data.
OTHER TIPS
If your bitmap is a device independent bitmap, you can access the pixel data using GetObject and passing in a BITMAP. This avoids making a copy of the pixel data.
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow