Reputation: 480
As the title says, I'm trying to find a method of converting a GDI+ Bitmap to a vector of unsigned chars, any help would be greatly appreciated.
Upvotes: 1
Views: 1616
Reputation: 308530
Have a look at Bitmap::LockBits
. Once you've locked the bits, it should be trivial to copy them to a vector<unsigned char>
. Better yet, resize the vector to the required size and let LockBits copy directly to it.
Upvotes: 2