Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
branch: master
Fetching contributors…

Octocat-spinner-32-eaf2f5

Cannot retrieve contributors at this time

file 35 lines (25 sloc) 0.984 kb
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
#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

Something went wrong with that request. Please try again.