int iBmpSize = cd.nTotleLen;
    HGLOBAL hMemBmp = GlobalAlloc(GMEM_FIXED, iBmpSize);
    IStream* pStmBmp = NULL;
    CreateStreamOnHGlobal(hMemBmp, FALSE, &pStmBmp);

    m_pbyBmp = (BYTE *)GlobalLock(hMemBmp);
    memcpy(m_pbyBmp, m_data, cd.nTotleLen);



    //Image *image = Image::FromStream(pStmBmp);
    image = Image::FromStream(pStmBmp);

参考:https://blog.csdn.net/zhonghongjun/article/details/46413055

posted on 2019-06-21 15:39  瓦楞球  阅读(1353)  评论(0编辑  收藏  举报