Index   Commented   Search   About

Decompressing Data

The following example shows how an application can initialize a decompressor using the ICDecompressBegin macro, decompress a frame sequence using the ICDecompress function, and terminate decompression using the ICDecompressEnd macro.

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.

}

Related Links

Software for Delphi and C++ Builder developers
Software for Visual Studio .NET developers
Software for Visual Basic 6 developers
Delphi Tips&Tricks
MegaDetailed.NET
TMS Scripter Studio Pro components for Delphi/C++Builder

More Online Helps

Win32 Programmer's Reference (win32.hlp)
OLE Programmer's Reference (ole.hlp)
Microsoft Windows Pen API Programmer's Reference (penapi.hlp)
Microsoft Windows Sockets 2 Reference (sock2.hlp)
Microsoft Windows Telephony API (TAPI) Programmer's Reference (tapi.hlp)
Unix Manual Pages

Free Tech Secrets ;) Copyright © 2008 Free Tect Secrets ;) greatis just4fun network just4fun