imgdecmp.h
上传用户:yuquansen
上传日期:2008-01-12
资源大小:380k
文件大小:3k
源码类别:

Windows CE

开发平台:

Visual C++

  1. /*---------------------------------------------------------------------------*
  2.  *
  3.  * (c) Copyright Microsoft Corp. 1997-98 All Rights Reserved
  4.  *
  5.  *  module: imgdecmp.h
  6.  *  date:
  7.  *  author: jaym
  8.  *
  9.  *  purpose: 
  10.  *
  11. *---------------------------------------------------------------------------*/
  12. #ifndef __IMGDECMP_H__
  13. #define __IMGDECMP_H__
  14. #ifdef __cplusplus
  15. extern "C" {
  16. #endif // __cplusplus
  17. #include "imgrendr.h"
  18. typedef void (CALLBACK *PROGRESSFUNC)(IImageRender *pRender, BOOL bComplete, LPARAM lParam);
  19. typedef DWORD (CALLBACK *GETDATAFUNC)(LPSTR szBuffer, DWORD dwBufferMax, LPARAM lParam);
  20. typedef struct tagDecompressImageInfo {
  21. DWORD                   dwSize;                                 // Size of this structure
  22. LPBYTE                  pbBuffer;                               // Pointer to the buffer to use for data
  23. DWORD                   dwBufferMax;                    // Size of the buffer
  24. DWORD                   dwBufferCurrent;                // The amount of data which is current in the buffer
  25. HBITMAP *               phBM;                                   // Pointer to the bitmap returned (can be NULL)
  26. IImageRender ** ppImageRender;                  // Pointer to an IImageRender object (can be NULL)
  27. int                             iBitDepth;                              // Bit depth of the output image
  28. LPARAM                  lParam;                                 // User parameter for callback functions
  29. HDC                             hdc;                                    // HDC to use for retrieving palettes
  30. int                             iScale;                                 // Scale factor (1 - 100)
  31. int                             iMaxWidth;                              // Maximum width of the output image
  32. int                             iMaxHeight;                             // Maxumum height of the output image
  33. GETDATAFUNC             pfnGetData;                             // Callback function to get more data
  34. PROGRESSFUNC    pfnImageProgress;               // Callback function to notify caller of progress decoding the image
  35. COLORREF                crTransparentOverride;  // If this color is not (UINT)-1, it will override the
  36. // transparent color in the image with this color. (GIF ONLY)
  37. } DecompressImageInfo;
  38. #define IMGDECOMP_E_NOIMAGE             0x800b0100
  39. COLORREF *
  40. GetHalftonePalette();
  41. COLORREF *
  42. Get332Palette();
  43. HRESULT
  44. DecompressImageIndirect(DecompressImageInfo *pParams);
  45. #ifdef __cplusplus
  46. };
  47. #endif // __cplusplus
  48. #endif // !__IMGDECMP_H__