-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathGIFClass.h
60 lines (49 loc) · 1.41 KB
/
GIFClass.h
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
#ifndef _GIF_V2_H_
#define _GIF_V2_H_
#include <fstream>
#include <string>
#include <exception>
#include "GIFLocalImage.h"
using std::list;
using std::string;
using std::exception;
using std::endl;
using std::cout;
using std::cin;
using std::ifstream;
using std::ofstream;
using std::ios;
using std::ios_base;
static const GIFData APP_EXT[14]={0x21, 0xFF, 0x0B, 'N','E','T','S','C','A','P','E','2','.','0'};
static const int ALLIMGS=-1;
class GIF{
private:
GIFData GIFHeader[SIZE_GIF_HEADER];
GIFData logicalScreen[SIZE_LOGICAL_SCREEN];
GIFData* GCT;
int GCTSize;
bool sort;
bool appExt;
short aniItr;
list<GIFLocalImage*> imageList;
int imageCnt;
int GIFSize;
void getGIF(GIFData* ptr, int fileSize);
public:
GIF(GIFData* stream, int fileSize);
GIF(const char* filename);
GIF(list<GIF*> gifList);
~GIF();
const GIFData* getGIFHeader(){return GIFHeader;}
const GIFData* getLogicalScreen(){return logicalScreen;}
const GIFData* getGCT(){return GCT;}
const int getGCTSize(){return GCTSize;}
const bool getAppExt(){return appExt;}
const int getImageCnt(){return imageCnt;}
short getAniItr(){return aniItr;}
list<GIFLocalImage*> & getImageList(){return imageList;}
const int getGIFSize(int i);
void writeBlob(GIFData* outputStream, int num); // set num to ALLIMGS(static const int -1) to Write All Images
void writeFile(char* filename, int num);
};
#endif // ifndef _GIF_V2_H_