From 81c291ffa7137257f1cfa6cecf3c01bcf4484295 Mon Sep 17 00:00:00 2001 From: TheEssem Date: Thu, 10 Sep 2020 21:04:09 -0500 Subject: [PATCH] Apparently some other commands had the same issue --- natives/blur.cc | 2 ++ natives/freeze.cc | 1 + natives/reverse.cc | 3 ++- natives/wall.cc | 1 + 4 files changed, 6 insertions(+), 1 deletion(-) diff --git a/natives/blur.cc b/natives/blur.cc index a6bc946..376fa45 100644 --- a/natives/blur.cc +++ b/natives/blur.cc @@ -24,6 +24,8 @@ class BlurWorker : public Napi::AsyncWorker { for_each(coalesced.begin(), coalesced.end(), blurImage(15)); } + for_each(coalesced.begin(), coalesced.end(), magickImage(type)); + optimizeImageLayers(&result, coalesced.begin(), coalesced.end()); if (delay != 0) for_each(result.begin(), result.end(), animationDelayImage(delay)); writeImages(result.begin(), result.end(), &blob); diff --git a/natives/freeze.cc b/natives/freeze.cc index b1e6833..6f4a8dd 100644 --- a/natives/freeze.cc +++ b/natives/freeze.cc @@ -16,6 +16,7 @@ class FreezeWorker : public Napi::AsyncWorker { readImages(&frames, in_path); for_each(frames.begin(), frames.end(), animationIterationsImage(loop ? 0 : 1)); + for_each(frames.begin(), frames.end(), magickImage(type)); if (delay != 0) for_each(frames.begin(), frames.end(), animationDelayImage(delay)); writeImages(frames.begin(), frames.end(), &blob); diff --git a/natives/reverse.cc b/natives/reverse.cc index 6f15013..ad612a6 100644 --- a/natives/reverse.cc +++ b/natives/reverse.cc @@ -1,6 +1,5 @@ #include #include -#include #include using namespace std; @@ -27,6 +26,8 @@ class ReverseWorker : public Napi::AsyncWorker { coalesced.reverse(); } + for_each(coalesced.begin(), coalesced.end(), magickImage(type)); + optimizeImageLayers(&result, coalesced.begin(), coalesced.end()); if (delay != 0) for_each(result.begin(), result.end(), animationDelayImage(delay)); writeImages(result.begin(), result.end(), &blob); diff --git a/natives/wall.cc b/natives/wall.cc index 4fbecd8..ec795bf 100644 --- a/natives/wall.cc +++ b/natives/wall.cc @@ -28,6 +28,7 @@ class WallWorker : public Napi::AsyncWorker { double arguments[16] = {0, 0, 57, 42, 0, 128, 63, 130, 128, 0, 140, 60, 128, 128, 140, 140}; image.distort(Magick::PerspectiveDistortion, 16, arguments); image.scale(Geometry("800x800>")); + image.magick(type); mid.push_back(image); }