简体   繁体   English

将字节数组转换为位图图像

[英]Converting a Byte Array into a Bitmap Image

I have a byte array named pBuffe of type unsigned char* pBuffer that was fed an 'image' (a bunch of bytes) by a high powered camera after it captured a picture. 我有一个名为pBuffe的字节数组,类型为unsigned char* pBuffer ,在捕获图片后,由高功率相机为其提供了一个“图像”(一堆字节)。 How do I go about converting this byte array into a viewable bitmap image file? 如何将这个字节数组转换为可见的位图图像文件?

I think you can solve this easily by using the well-known and popular EasyBMP library. 我认为您可以通过使用知名和流行的EasyBMP库轻松解决此问题。 It creates the proper file header and everything you need for it. 它会创建适当的文件头以及所需的一切。 As a bonus, it supports multiple platforms. 另外,它支持多个平台。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM