使用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);