views:

1981

answers:

3

How can I convert a bitmap to a byte array in c++ WITHOUT the .net framework?

+3  A: 

If you’re using Windows, you can use GetDIBits to retrieve the bitmap data.

Konrad Rudolph
A: 

Thanks for the help!

A: 

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.

mackenir