首页 诗词 字典 板报 句子 名言 友答 励志 学校 网站地图
当前位置: 首页 > 教程频道 > 开发语言 > VC/MFC >

使用ICDecompressGetFormat遇到的异常

2012-03-01 
使用ICDecompressGetFormat遇到的错误 BITMAPINFOm_InInfo,m_Testif(ICDecompressGetFormat(m_CV.hic,&m_

使用ICDecompressGetFormat遇到的错误

BITMAPINFO   m_InInfo,m_Test;


if(ICDecompressGetFormat(m_CV.hic,   &m_InInfo,   &m_Test)!=ICERR_OK)
AfxMessageBox( "格式获取错误 ");  

m_InInfo为输入格式,m_Test为输出格式

监视m_Test的bmiheader各个参数发现biSizeImage值与输入格式中的值相等

这个是什么原因?

[解决办法]
这是应用的例子,你在看看自己的代码。
LPBITMAPINFOHEADER lpbiIn, lpbiOut;

// *lpbiIn must be initialized to the input format.

dwFormatSize = ICCompressGetFormatSize(hIC, lpbiIn);
h = GlobalAlloc(GHND, dwFormatSize);
lpbiOut = (LPBITMAPINFOHEADER)GlobalLock(h);
ICCompressGetFormat(hIC, lpbiIn, lpbiOut);

热点排行