#include <windows.h>
class CImageColorTable;
class CCriticalSection;
class CImage {
public:
CImage() {init();}
~CImage() {clear();}
bool LoadImage(LPCTSTR pszFileName);
bool Create(int width, int height, int bpp);
bool SaveImage(LPCTSTR pszFileName);
bool SaveAsGif(LPCTSTR pszFileName, bool _bInterlace,
int background, int transparent = -1);
// public utility functions (not shown) ...
bool SetColorTable(const CImageColorTable& clrTbl,
bool bRemap = false);
operator HBITMAP() {return m_hImage;}
// the methods below are only possible if exception handling
// is enabled as they use STL container classes
#ifdef _CPPUNWIND
void OptimizeForSize();
#endif // _CPPUNWIND
private:
// cannot copy or assign
CImage(const CImage& ) {;}
CImage& operator = (const CImage& ) {return *this;}
void clear();
void init() {m_hImage = 0;}
// private utility functions (not shown) ...
HBITMAP m_hImage;
DIBSECTION ds;
};
/* End of File */