-
Notifications
You must be signed in to change notification settings - Fork 25
/
Copy pathMpcDecode.hpp
64 lines (52 loc) · 2.38 KB
/
MpcDecode.hpp
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
#ifndef MPCDECODE_HPP_INCLUDED
#define MPCDECODE_HPP_INCLUDED
#include "wx/string.h"
#include "wx/image.h"
#include "mydefs.hpp"
#include "FreeImage.h"
class MpcDecode
{
public:
enum COLOUR_MODLE{PIC_RGB,PIC_RGBA, PIC_BGRA};
MpcDecode();
~MpcDecode();
void Init();
MpcDecode(const wxString MpcFilePath);
void SetMpcFile(const wxString MpcFilePath);
wxString GetFilePath();
bool ReadMpcFile();
bool ReadMpcFile(const wxString MpcFilePath);
wxString GetVersionInfo();
unsigned long GetFramesDataLengthSum();
unsigned long GetFramesCounts();
//unsigned long GetFrameDataLength(const unsigned long index);
long GetGlobleWidth();
long GetGlobleHeight();
//long GetFrameWidth(const unsigned long index);
//long GetFrameHeight(const unsigned long index);
long GetDirection();
unsigned long GetColourCounts();
unsigned long GetInterval();
long GetBottom();
//data must be free() if won't use anymore
Palette_Colour GetTransparentColor();
unsigned char* GetDecodedFrameData(const unsigned long index, long* Width = NULL, long* Height = NULL,
COLOUR_MODLE mod = PIC_RGB,bool *isTransparent = NULL, Palette_Colour *TransparentColor = NULL);
unsigned char* GetGlobleDecodedFrameData(const unsigned long index, long* Width = NULL, long* Height = NULL,
COLOUR_MODLE mod = PIC_RGB,bool *isTransparent = NULL, Palette_Colour *TransparentColor = NULL);
FILOCRGBQUAD* GetFIDecodedFrameData(const unsigned long index, long* Width = NULL, long* Height = NULL,
COLOUR_MODLE mod = PIC_RGB,bool *isTransparent = NULL, Palette_Colour *TransparentColor = NULL);
FILOCRGBQUAD* GetGlobleFIDecodedFrameData(const unsigned long index, long* Width = NULL, long* Height = NULL,
COLOUR_MODLE mod = PIC_RGB,bool *isTransparent = NULL, Palette_Colour *TransparentColor = NULL);
wxImage GetFrameImage(const unsigned long index, bool ShdIncluded = false);
Palette PaletteData;
long DecodeType;
private:
void InitTransparentColor();
Palette_Colour TransparentColor;
MpcFileHead FileHead;
wxString FilePath;
unsigned long FrameDataBegPos;
//FrameData* FramesDataBlock;
};
#endif // MPCDECODE_HPP_INCLUDED