-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathAniGIFMaker.h
44 lines (34 loc) · 966 Bytes
/
AniGIFMaker.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
#ifndef ANI_GIF_MAKER_H
#define ANI_GIF_MAKER_H
#include <iostream>
#include <string>
#include <list>
#include <Magick++.h>
#include "GIF.h"
using std::cout;
using std::endl;
using std::string;
using std::list;
using namespace Magick;
class AniGIFMaker{
private:
double tolerance;
bool cOption;
char mode;
char *inputSize;
Geometry maxGeo;
list<GIF*> GIFImageList;
void calcSize(Geometry imgGeo, Geometry pageGeo);
void setAniGIFProperties(Image *&image);
bool isNoresize(const Geometry imgGeo, const Geometry pageGeo);
void makeInputImage(GIF *&inputGIFImage, int &cnt, Image *&inputImage);
void cropImage(Image *&inputImage);
void insertEndGIF(Image *&inputImage);
public:
AniGIFMaker(double tolerance, bool cOption, char mode, char *inputSize);
~AniGIFMaker();
void addToAniGIF(const char* input);
void makeAniGIF(const char *outfilename);
int getImgList(){return GIFImageList.size();}
};
#endif // ANI_GIF_MAKER_H