从jpeg内存缓冲区创建HBITMAP? [英] Create HBITMAP from jpeg memory buffer?
本文介绍了从jpeg内存缓冲区创建HBITMAP?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我想从JPEG格式的字节数组中创建HBITMAP.
I want to create HBITMAP from byte array with JPEG format.
我已经搜索过,但是只能从位图文件中创建
I have searched but I only can create it from bitmap file as
HBITMAP hbm = (HBITMAP)LoadImage(NULL,"fileName",IMAGE_BITMAP,0,0,LR_LOADFROMFILE|LR_CREATEDIBSECTION);
有人可以告诉我怎么做吗?
Can someone show me how to do it?
推荐答案
只需使用GDIplus. 它支持加载JPEG,而其他一些东西则更具逻辑感
Just use GDIplus. It supports loading JPEGs, and some other stuff feels much more logically
http://msdn.microsoft. com/en-us/library/ms533830%28v = vs.85%29.aspx
使用位图"类. 当您将jpeg放在缓冲区中时,您需要通过流读取它.
Use "Bitmap" class. When you have the jpeg in a buffer, you need to read it by a stream.
这篇关于从jpeg内存缓冲区创建HBITMAP?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文