From c01ac7d32f5789c0af50ca3674c939a0eab55875 Mon Sep 17 00:00:00 2001 From: Essem Date: Tue, 28 Jun 2022 15:09:30 -0500 Subject: [PATCH] Copy over webp animation in gif --- natives/togif.cc | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/natives/togif.cc b/natives/togif.cc index 5095410..1cc234e 100644 --- a/natives/togif.cc +++ b/natives/togif.cc @@ -20,8 +20,9 @@ Napi::Value ToGif(const Napi::CallbackInfo &info) { } else { VOption *options = VImage::option()->set("access", "sequential"); - VImage in = - VImage::new_from_buffer(data.Data(), data.Length(), "", options); + VImage in = VImage::new_from_buffer(data.Data(), data.Length(), "", + type == "webp" ? options->set("n", -1) + : options); void *buf; size_t length;