Flush current work
[desktopswitcher.git] / png.h
blob79d3b54e8b3fc354ee941c25244cf2922c0ecbe6
1 /////////////////////////////////////////////////////////////////////////////////
2 //
3 // $Id: png.h,v 1.2 2003/08/03 16:56:29 nedko Exp $
4 //
5 // DESCRIPTION:
6 //
7 // NOTES:
8 //
9 /////////////////////////////////////////////////////////////////////////////////
11 #ifndef PNG_H__76DD7C22_846A_4AE0_B01C_813DBDADE3C4__INCLUDED
12 #define PNG_H__76DD7C22_846A_4AE0_B01C_813DBDADE3C4__INCLUDED
14 class CPNGImage
16 public:
17 CPNGImage();
18 ~CPNGImage();
20 bool LoadPNGImage(const char *pszPath);
21 unsigned int GetWidth();
22 unsigned int GetHeight();
23 HBITMAP CreateBitmap(HDC hMemoryDC);
24 private:
25 static void PNGAPI PNG_ErrorHandler PNGARG((png_structp s, png_const_charp str));
26 static void PremultiplyAlpha(unsigned int nWidth, unsigned int nHeight, unsigned char *pData);
27 static unsigned char * GenerateNotLoadedBitmapData(unsigned int nWidth, unsigned int nHeight);
29 private:
30 unsigned int m_nWidth;
31 unsigned int m_nHeight;
32 unsigned char *m_pData;
35 extern CPNGImage g_Image;
37 #endif // #ifndef PNG_H__76DD7C22_846A_4AE0_B01C_813DBDADE3C4__INCLUDED
39 /////////////////////////////////////////////////////////////////////////////////
41 // Modifications log:
43 // !!! WARNING !!! Following lines are automatically updated by the CVS system.
45 // $Log: png.h,v $
46 // Revision 1.2 2003/08/03 16:56:29 nedko
47 // Flush current work
49 // Revision 1.1 2002/06/29 15:03:33 nedko
50 // *** empty log message ***
52 /////////////////////////////////////////////////////////////////////////////////