-
Notifications
You must be signed in to change notification settings - Fork 10
/
Copy pathAsfDecode.hpp
59 lines (48 loc) · 1.73 KB
/
AsfDecode.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
#ifndef ASFDECODE_HPP_INCLUDED
#define ASFDECODE_HPP_INCLUDED
#include "wx/string.h"
#include "wx/image.h"
#include "wx/dcclient.h"
#include "mydefs.hpp"
#include <list>
class AsfDecode
{
public:
enum COLOUR_MODLE{PIC_RGB,PIC_RGBA, PIC_BGRA};
AsfDecode();
~AsfDecode();
void Init();
AsfDecode(const wxString AsfFilePath);
void SetAsfFile(const wxString AsfFilePath);
wxString GetFilePath();
bool ReadAsfFile();
bool ReadAsfFile(const wxString AsfFilePath);
wxString GetVersionInfo();
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();
long GetLeft();
//data must be free() if won't use anymore
unsigned char* GetDecodedFrameData(unsigned long index, long* Width = NULL, long* Height = NULL,
COLOUR_MODLE mod = PIC_RGB,bool *isTransparent = NULL,
Palette_Colour *TransparentColor = NULL, unsigned char transmask = 0);
wxImage GetImageFromRgbaData(unsigned char *data, int width, int height);
wxBitmap GetDirectionBitmapFromBufferdData(long direction, long index = 0);
void BufferData();
Palette PaletteData;
private:
void FreeBufferData();
//Frame_Data *first;
std::list<wxBitmap*> BufferdFrame;
AsfFileHead FileHead;
wxString FilePath;
unsigned long FrameDataBegPos;
};
#endif // ASFDECODE_HPP_INCLUDED