开发者

Converting Bitmap to a vector of unsigned char

开发者 https://www.devze.com 2023-04-09 22:59 出处:网络
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 yo

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

精彩评论

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

关注公众号