/
animated_gif.h
34 lines (25 loc) · 984 Bytes
/
animated_gif.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
#ifndef ANIMATED_GIF_H
#define ANIMATED_GIF_H
#include <node.h>
#include <node_buffer.h>
#include "gif_encoder.h"
#include "common.h"
class AnimatedGif : public node::ObjectWrap {
int width, height;
buffer_type buf_type;
AnimatedGifEncoder gif_encoder;
unsigned char *data;
Color transparency_color;
public:
static void Initialize(v8::Handle<v8::Object> target);
AnimatedGif(int wwidth, int hheight, buffer_type bbuf_type);
v8::Handle<v8::Value> Push(unsigned char *data_buf, int x, int y, int w, int h);
void EndPush();
static v8::Handle<v8::Value> New(const v8::Arguments &args);
static v8::Handle<v8::Value> Push(const v8::Arguments &args);
static v8::Handle<v8::Value> EndPush(const v8::Arguments &args);
static v8::Handle<v8::Value> End(const v8::Arguments &args);
static v8::Handle<v8::Value> GetGif(const v8::Arguments &args);
static v8::Handle<v8::Value> SetOutputFile(const v8::Arguments &args);
};
#endif