开发者

Converting Bitmap to a vector of unsigned char

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.


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.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜