3 * Purpose: ICON Image Class Loader and Writer
5 /* ==========================================================
6 * CxImageICO (c) 07/Aug/2001 Davide Pizzolato - www.xdp.it
7 * For conditions of distribution and use, see copyright notice in ximage.h
8 * ==========================================================
10 #if !defined(__ximaICO_h)
15 #if CXIMAGE_SUPPORT_ICO
17 class CxImageICO: public CxImage
19 typedef struct tagIconDirectoryEntry {
30 typedef struct tagIconDir {
37 CxImageICO(): CxImage(CXIMAGE_FORMAT_ICO) {m_dwImageOffset=0;}
39 // bool Load(const TCHAR * imageFileName){ return CxImage::Load(imageFileName,CXIMAGE_FORMAT_ICO);}
40 // bool Save(const TCHAR * imageFileName){ return CxImage::Save(imageFileName,CXIMAGE_FORMAT_ICO);}
41 bool Decode(CxFile * hFile);
42 bool Decode(FILE *hFile) { CxIOFile file(hFile); return Decode(&file); }
44 #if CXIMAGE_SUPPORT_ENCODE
45 bool Encode(CxFile * hFile, bool bAppend=false, int nPageCount=0);
46 bool Encode(CxFile * hFile, CxImage ** pImages, int nPageCount);
47 bool Encode(FILE *hFile, bool bAppend=false, int nPageCount=0)
48 { CxIOFile file(hFile); return Encode(&file,bAppend,nPageCount); }
49 bool Encode(FILE *hFile, CxImage ** pImages, int nPageCount)
50 { CxIOFile file(hFile); return Encode(&file, pImages, nPageCount); }
51 #endif // CXIMAGE_SUPPORT_ENCODE
53 DWORD m_dwImageOffset;