set reoptimize to override input GCT (#287)

This commit is contained in:
bjcscat 2022-06-27 21:58:42 -05:00 committed by GitHub
parent 2967a5eddc
commit 207d950a6c
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
11 changed files with 11 additions and 11 deletions

View file

@ -62,7 +62,7 @@ Napi::Value Caption(const Napi::CallbackInfo &info) {
size_t length;
final.write_to_buffer(
("." + type).c_str(), &buf, &length,
type == "gif" ? VImage::option()->set("dither", 0) : 0);
type == "gif" ? VImage::option()->set("dither", 0)->set("reoptimise", 1) : 0);
vips_thread_shutdown();

View file

@ -66,7 +66,7 @@ Napi::Value CaptionTwo(const Napi::CallbackInfo &info) {
size_t length;
final.write_to_buffer(
("." + type).c_str(), &buf, &length,
type == "gif" ? VImage::option()->set("dither", 0) : 0);
type == "gif" ? VImage::option()->set("dither", 0)->set("reoptimise", 1) : 0);
vips_thread_shutdown();

View file

@ -48,7 +48,7 @@ Napi::Value Crop(const Napi::CallbackInfo &info) {
size_t length;
final.write_to_buffer(
("." + type).c_str(), &buf, &length,
type == "gif" ? VImage::option()->set("dither", 0) : 0);
type == "gif" ? VImage::option()->set("dither", 0)->set("reoptimise", 1) : 0);
vips_thread_shutdown();

View file

@ -56,7 +56,7 @@ Napi::Value Flag(const Napi::CallbackInfo &info) {
size_t length;
final.write_to_buffer(
("." + type).c_str(), &buf, &length,
type == "gif" ? VImage::option()->set("dither", 0) : 0);
type == "gif" ? VImage::option()->set("dither", 0)->set("reoptimise", 1) : 0);
Napi::Object result = Napi::Object::New(env);
result.Set("data", Napi::Buffer<char>::Copy(env, (char *)buf, length));

View file

@ -49,7 +49,7 @@ Napi::Value Gamexplain(const Napi::CallbackInfo &info) {
size_t length;
final.write_to_buffer(
("." + type).c_str(), &buf, &length,
type == "gif" ? VImage::option()->set("dither", 0) : 0);
type == "gif" ? VImage::option()->set("dither", 0)->set("reoptimise", 1) : 0);
vips_thread_shutdown();

View file

@ -128,7 +128,7 @@ Napi::Value Meme(const Napi::CallbackInfo &info) {
size_t length;
final.write_to_buffer(
("." + type).c_str(), &buf, &length,
type == "gif" ? VImage::option()->set("dither", 0) : 0);
type == "gif" ? VImage::option()->set("dither", 0)->set("reoptimise", 1) : 0);
vips_thread_shutdown();

View file

@ -59,7 +59,7 @@ Napi::Value Reddit(const Napi::CallbackInfo &info) {
size_t length;
final.write_to_buffer(
("." + type).c_str(), &buf, &length,
type == "gif" ? VImage::option()->set("dither", 0) : 0);
type == "gif" ? VImage::option()->set("dither", 0)->set("reoptimise", 1) : 0);
vips_thread_shutdown();

View file

@ -67,7 +67,7 @@ Napi::Value Snapchat(const Napi::CallbackInfo &info) {
size_t length;
final.write_to_buffer(
("." + type).c_str(), &buf, &length,
type == "gif" ? VImage::option()->set("dither", 0) : 0);
type == "gif" ? VImage::option()->set("dither", 0)->set("reoptimise", 1) : 0);
vips_thread_shutdown();

View file

@ -52,7 +52,7 @@ Napi::Value Uncaption(const Napi::CallbackInfo &info) {
size_t length;
final.write_to_buffer(
("." + type).c_str(), &buf, &length,
type == "gif" ? VImage::option()->set("dither", 0) : 0);
type == "gif" ? VImage::option()->set("dither", 0)->set("reoptimise", 1) : 0);
vips_thread_shutdown();

View file

@ -154,7 +154,7 @@ Napi::Value Watermark(const Napi::CallbackInfo &info) {
size_t length;
final.write_to_buffer(
("." + type).c_str(), &buf, &length,
type == "gif" ? VImage::option()->set("dither", 0) : 0);
type == "gif" ? VImage::option()->set("dither", 0)->set("reoptimise", 1) : 0);
vips_thread_shutdown();

View file

@ -81,7 +81,7 @@ Napi::Value Whisper(const Napi::CallbackInfo &info) {
size_t length;
final.write_to_buffer(
("." + type).c_str(), &buf, &length,
type == "gif" ? VImage::option()->set("dither", 0) : 0);
type == "gif" ? VImage::option()->set("dither", 0)->set("reoptimise", 1) : 0);
vips_thread_shutdown();