@ -45,6 +45,14 @@ if (canvas.jpegVersion) {
exports.jpegVersion = canvas.jpegVersion;
}
/**
* gif_lib version.
*/
if (canvas.gifVersion) {
exports.gifVersion = canvas.gifVersion.replace(/[^.\d]/g, '');
* Expose constructors.
@ -13,7 +13,6 @@
#include <node_buffer.h>
#ifdef HAVE_GIF
#include <gif_lib.h>
typedef struct {
uint8_t *buf;
unsigned len;
@ -15,6 +15,10 @@
#include <jerror.h>
#endif
class Image: public node::ObjectWrap {
public:
char *filename;
@ -30,6 +30,9 @@ init (Handle<Object> target) {
snprintf(jpeg_version, 10, "%d%c", JPEG_LIB_VERSION_MAJOR, JPEG_LIB_VERSION_MINOR + 'a' - 1);
target->Set(String::New("jpegVersion"), String::New(jpeg_version));
target->Set(String::New("gifVersion"), String::New(GIF_LIB_VERSION));
NODE_MODULE(canvas,init);