데이터 압축 해제

[이 페이지와 연결된 기능인 Video Compression Manager는 레거시 기능입니다. 새 코드는 이 기능을 사용하지 않는 것이 좋습니다.]

다음 예제에서는 애플리케이션이 ICDecompressBegin 매크로를 사용하여 압축 해제기를 초기화하고, ICDecompress 함수를 사용하여 프레임 시퀀스의 압축을 풀고, ICDecompressEnd 매크로를 사용하여 압축 해제를 종료하는 방법을 보여 줍니다.

LPBITMAPINFOHEADER lbpiIn, lpbiOut; 
LPVOID             lpIn, lpOut; 
LONG               lNumFrames, lFrameNum; 
 
// Assume lpbiIn and lpbiOut are initialized to the input and output 
// format and lpIn and lpOut are pointing to the buffers. 
if (ICDecompressBegin(hIC, lpbiIn, lpbiOut) == ICERR_OK)
{ 
    for (lFrameNum = 0; lFrameNum < lNumFrames, lFrameNum++)
    { 
        if (ICDecompress(hIC, 0, lpbiIn, lpIn, lpbiOut, 
            lpOut) == ICERR_OK) 
        { 
            // Frame decompressed OK so we can process it as required. 
        } 
        else 
        { 
            // Handle the decompression error that occurred. 
        } 
    } 
    ICDecompressEnd(hIC); 
} 
else 
{ 
    // Handle the error identifying an unsupported format. 
}