3 * Purpose: Declaration of the MNG Image Class
4 * Author: Davide Pizzolato - www.xdp.it
7 /* ==========================================================
8 * CxImageMNG (c) 07/Aug/2001 Davide Pizzolato - www.xdp.it
9 * For conditions of distribution and use, see copyright notice in ximage.h
11 * Special thanks to Frank Haug <f.haug(at)jdm(dot)de> for suggestions and code.
13 * original mng.cpp code created by Nikolaus Brennig, November 14th, 2000. <virtualnik(at)nol(dot)at>
15 * LIBMNG Copyright (c) 2000,2001 Gerard Juyn (gerard@libmng.com)
16 * ==========================================================
19 #if !defined(__ximaMNG_h)
24 #if CXIMAGE_SUPPORT_MNG
27 #define MNG_SUPPORT_DISPLAY
28 #define MNG_SUPPORT_READ
29 #define MNG_SUPPORT_WRITE
30 #define MNG_ACCESS_CHUNKS
31 #define MNG_STORE_CHUNKS
34 #include "../mng/libmng.h"
35 #include "../mng/libmng_data.h"
36 #include "../mng/libmng_error.h"
39 //unsigned long _stdcall RunMNGThread(void *lpParam);
41 typedef struct tagmngstuff
53 mng_bool animation_enabled;
59 class CxImageMNG: public CxImage
65 bool Load(const TCHAR * imageFileName);
67 bool Decode(CxFile * hFile);
68 bool Decode(FILE *hFile) { CxIOFile file(hFile); return Decode(&file); }
70 #if CXIMAGE_SUPPORT_ENCODE
71 bool Encode(CxFile * hFile);
72 bool Encode(FILE *hFile) { CxIOFile file(hFile); return Encode(&file); }
73 bool Save(const TCHAR * imageFileName){ return CxImage::Save(imageFileName,CXIMAGE_FORMAT_MNG);}
74 #endif // CXIMAGE_SUPPORT_ENCODE
77 void SetSpeed(float speed);
82 void WritePNG(mng_handle hMNG, int Frame, int FrameCount );
83 void SetCallbacks(mng_handle mng);