1 /*---------------------------------------------------------------------------*\
3 * (c) Copyright Microsoft Corp. 1997-98 All Rights Reserved
11 \*---------------------------------------------------------------------------*/
12 #ifndef __IMGDECMP_H__
13 #define __IMGDECMP_H__
21 typedef void (CALLBACK *PROGRESSFUNC)(IImageRender *pRender, BOOL bComplete, LPARAM lParam);
22 typedef DWORD (CALLBACK *GETDATAFUNC)(LPSTR szBuffer, DWORD dwBufferMax, LPARAM lParam);
24 typedef struct tagDecompressImageInfo {
25 DWORD dwSize; // Size of this structure
26 LPBYTE pbBuffer; // Pointer to the buffer to use for data
27 DWORD dwBufferMax; // Size of the buffer
28 DWORD dwBufferCurrent; // The amount of data which is current in the buffer
29 HBITMAP * phBM; // Pointer to the bitmap returned (can be NULL)
30 IImageRender ** ppImageRender; // Pointer to an IImageRender object (can be NULL)
31 int iBitDepth; // Bit depth of the output image
32 LPARAM lParam; // User parameter for callback functions
33 HDC hdc; // HDC to use for retrieving palettes
34 int iScale; // Scale factor (1 - 100)
35 int iMaxWidth; // Maximum width of the output image
36 int iMaxHeight; // Maxumum height of the output image
37 GETDATAFUNC pfnGetData; // Callback function to get more data
38 PROGRESSFUNC pfnImageProgress; // Callback function to notify caller of progress decoding the image
39 COLORREF crTransparentOverride; // If this color is not (UINT)-1, it will override the
40 // transparent color in the image with this color. (GIF ONLY)
41 } DecompressImageInfo;
43 #define IMGDECOMP_E_NOIMAGE 0x800b0100
52 DecompressImageIndirect(DecompressImageInfo *pParams);
58 #endif // !__IMGDECMP_H__