2020-07-12 15:14:39 +00:00
|
|
|
#include <napi.h>
|
|
|
|
#include "blur.h"
|
2021-12-14 07:16:23 +00:00
|
|
|
#include "colors.h"
|
2020-07-23 20:49:34 +00:00
|
|
|
#include "caption.h"
|
|
|
|
#include "caption2.h"
|
2020-07-12 15:14:39 +00:00
|
|
|
#include "circle.h"
|
2020-07-23 22:43:39 +00:00
|
|
|
#include "crop.h"
|
2021-06-29 22:26:22 +00:00
|
|
|
#include "deepfry.h"
|
2020-07-12 15:14:39 +00:00
|
|
|
#include "explode.h"
|
2020-07-14 14:53:51 +00:00
|
|
|
#include "flag.h"
|
|
|
|
#include "flip.h"
|
|
|
|
#include "freeze.h"
|
2020-07-16 14:31:48 +00:00
|
|
|
#include "gamexplain.h"
|
|
|
|
#include "globe.h"
|
2020-07-21 14:03:08 +00:00
|
|
|
#include "homebrew.h"
|
2020-07-12 15:14:39 +00:00
|
|
|
#include "invert.h"
|
2020-07-20 22:10:04 +00:00
|
|
|
#include "jpeg.h"
|
|
|
|
#include "magik.h"
|
|
|
|
#include "meme.h"
|
|
|
|
#include "mirror.h"
|
2021-04-24 22:54:47 +00:00
|
|
|
#include "swirl.h"
|
2020-07-22 18:12:38 +00:00
|
|
|
#include "motivate.h"
|
2021-04-26 14:47:03 +00:00
|
|
|
#include "reddit.h"
|
2020-07-22 18:12:38 +00:00
|
|
|
#include "resize.h"
|
|
|
|
#include "reverse.h"
|
|
|
|
#include "scott.h"
|
2021-06-15 03:03:48 +00:00
|
|
|
#include "snapchat.h"
|
2020-07-22 18:12:38 +00:00
|
|
|
#include "sonic.h"
|
2022-10-07 18:26:12 +00:00
|
|
|
#include "speed.h"
|
2020-07-23 00:54:58 +00:00
|
|
|
#include "spin.h"
|
2022-10-07 18:26:12 +00:00
|
|
|
#include "squish.h"
|
2020-07-23 00:54:58 +00:00
|
|
|
#include "tile.h"
|
2022-06-25 17:40:52 +00:00
|
|
|
#include "togif.h"
|
2022-07-30 21:00:09 +00:00
|
|
|
#include "uncanny.h"
|
2021-05-04 21:28:34 +00:00
|
|
|
#include "uncaption.h"
|
2020-07-23 20:49:34 +00:00
|
|
|
#include "wall.h"
|
2020-07-14 14:53:51 +00:00
|
|
|
#include "watermark.h"
|
2021-07-12 21:02:00 +00:00
|
|
|
#include "whisper.h"
|
2021-12-03 00:05:52 +00:00
|
|
|
#include "zamn.h"
|
2020-07-12 15:14:39 +00:00
|
|
|
|
2021-12-31 05:08:06 +00:00
|
|
|
#ifdef _WIN32
|
|
|
|
#include <Magick++.h>
|
|
|
|
#endif
|
2022-02-12 21:09:59 +00:00
|
|
|
#include <vips/vips8>
|
2021-12-31 05:08:06 +00:00
|
|
|
|
2020-07-12 15:14:39 +00:00
|
|
|
Napi::Object Init(Napi::Env env, Napi::Object exports)
|
|
|
|
{
|
2021-12-31 05:08:06 +00:00
|
|
|
#ifdef _WIN32
|
|
|
|
Magick::InitializeMagick("");
|
|
|
|
#endif
|
2022-02-12 21:09:59 +00:00
|
|
|
if (vips_init(""))
|
|
|
|
vips_error_exit(NULL);
|
2020-07-12 15:14:39 +00:00
|
|
|
exports.Set(Napi::String::New(env, "blur"), Napi::Function::New(env, Blur));
|
2021-12-14 07:16:23 +00:00
|
|
|
exports.Set(Napi::String::New(env, "colors"), Napi::Function::New(env, Colors));
|
2020-07-23 20:49:34 +00:00
|
|
|
exports.Set(Napi::String::New(env, "caption"), Napi::Function::New(env, Caption));
|
|
|
|
exports.Set(Napi::String::New(env, "captionTwo"), Napi::Function::New(env, CaptionTwo));
|
2020-07-12 15:14:39 +00:00
|
|
|
exports.Set(Napi::String::New(env, "circle"), Napi::Function::New(env, Circle));
|
2020-07-23 22:43:39 +00:00
|
|
|
exports.Set(Napi::String::New(env, "crop"), Napi::Function::New(env, Crop));
|
2021-06-29 22:26:22 +00:00
|
|
|
exports.Set(Napi::String::New(env, "deepfry"), Napi::Function::New(env, Deepfry));
|
2020-07-12 15:14:39 +00:00
|
|
|
exports.Set(Napi::String::New(env, "explode"), Napi::Function::New(env, Explode));
|
2020-07-14 14:53:51 +00:00
|
|
|
exports.Set(Napi::String::New(env, "flag"), Napi::Function::New(env, Flag));
|
|
|
|
exports.Set(Napi::String::New(env, "flip"), Napi::Function::New(env, Flip));
|
|
|
|
exports.Set(Napi::String::New(env, "freeze"), Napi::Function::New(env, Freeze));
|
2020-07-16 14:31:48 +00:00
|
|
|
exports.Set(Napi::String::New(env, "gamexplain"), Napi::Function::New(env, Gamexplain));
|
|
|
|
exports.Set(Napi::String::New(env, "globe"), Napi::Function::New(env, Globe));
|
2020-07-21 14:03:08 +00:00
|
|
|
exports.Set(Napi::String::New(env, "homebrew"), Napi::Function::New(env, Homebrew));
|
2020-07-12 15:14:39 +00:00
|
|
|
exports.Set(Napi::String::New(env, "invert"), Napi::Function::New(env, Invert));
|
2020-07-20 22:10:04 +00:00
|
|
|
exports.Set(Napi::String::New(env, "jpeg"), Napi::Function::New(env, Jpeg));
|
|
|
|
exports.Set(Napi::String::New(env, "magik"), Napi::Function::New(env, Magik));
|
|
|
|
exports.Set(Napi::String::New(env, "meme"), Napi::Function::New(env, Meme));
|
|
|
|
exports.Set(Napi::String::New(env, "mirror"), Napi::Function::New(env, Mirror));
|
2020-07-22 18:12:38 +00:00
|
|
|
exports.Set(Napi::String::New(env, "motivate"), Napi::Function::New(env, Motivate));
|
2021-04-26 14:47:03 +00:00
|
|
|
exports.Set(Napi::String::New(env, "reddit"), Napi::Function::New(env, Reddit));
|
2020-07-22 18:12:38 +00:00
|
|
|
exports.Set(Napi::String::New(env, "resize"), Napi::Function::New(env, Resize));
|
|
|
|
exports.Set(Napi::String::New(env, "reverse"), Napi::Function::New(env, Reverse));
|
|
|
|
exports.Set(Napi::String::New(env, "scott"), Napi::Function::New(env, Scott));
|
2021-06-15 03:03:48 +00:00
|
|
|
exports.Set(Napi::String::New(env, "snapchat"), Napi::Function::New(env, Snapchat));
|
2020-07-22 18:12:38 +00:00
|
|
|
exports.Set(Napi::String::New(env, "sonic"), Napi::Function::New(env, Sonic));
|
2022-10-07 18:26:12 +00:00
|
|
|
exports.Set(Napi::String::New(env, "speed"), Napi::Function::New(env, Speed));
|
2020-07-23 00:54:58 +00:00
|
|
|
exports.Set(Napi::String::New(env, "spin"), Napi::Function::New(env, Spin));
|
2022-10-07 18:26:12 +00:00
|
|
|
exports.Set(Napi::String::New(env, "squish"), Napi::Function::New(env, Squish));
|
2020-07-23 00:54:58 +00:00
|
|
|
exports.Set(Napi::String::New(env, "swirl"), Napi::Function::New(env, Swirl));
|
|
|
|
exports.Set(Napi::String::New(env, "tile"), Napi::Function::New(env, Tile));
|
2022-06-25 17:40:52 +00:00
|
|
|
exports.Set(Napi::String::New(env, "togif"), Napi::Function::New(env, ToGif));
|
2022-07-30 21:00:09 +00:00
|
|
|
exports.Set(Napi::String::New(env, "uncanny"), Napi::Function::New(env, Uncanny));
|
2021-05-04 21:28:34 +00:00
|
|
|
exports.Set(Napi::String::New(env, "uncaption"), Napi::Function::New(env, Uncaption));
|
2020-07-23 20:49:34 +00:00
|
|
|
exports.Set(Napi::String::New(env, "wall"), Napi::Function::New(env, Wall));
|
2020-07-14 14:53:51 +00:00
|
|
|
exports.Set(Napi::String::New(env, "watermark"), Napi::Function::New(env, Watermark));
|
2021-07-12 21:02:00 +00:00
|
|
|
exports.Set(Napi::String::New(env, "whisper"), Napi::Function::New(env, Whisper));
|
2021-12-03 00:05:52 +00:00
|
|
|
exports.Set(Napi::String::New(env, "zamn"), Napi::Function::New(env, Zamn));
|
2020-07-12 15:14:39 +00:00
|
|
|
return exports;
|
|
|
|
}
|
|
|
|
|
2022-02-12 21:09:59 +00:00
|
|
|
NODE_API_MODULE(addon, Init)
|