Fixed dispose weirdness with caption and spin
This commit is contained in:
parent
4a4822851f
commit
165fff0cf2
2 changed files with 4 additions and 0 deletions
|
@ -41,6 +41,7 @@ class CaptionWorker : public Napi::AsyncWorker {
|
|||
appended.repage();
|
||||
appended.magick(type);
|
||||
appended.animationDelay(delay == 0 ? image.animationDelay() : delay);
|
||||
appended.gifDisposeMethod(Magick::BackgroundDispose);
|
||||
captioned.push_back(appended);
|
||||
}
|
||||
|
||||
|
|
|
@ -27,6 +27,7 @@ class SpinWorker : public Napi::AsyncWorker {
|
|||
|
||||
int i = 0;
|
||||
for (Image &image : coalesced) {
|
||||
image.virtualPixelMethod(Magick::TransparentVirtualPixelMethod);
|
||||
image.scale(Geometry("256x256"));
|
||||
image.alphaChannel(Magick::SetAlphaChannel);
|
||||
double rotation[1] = {360 * i / coalesced.size()};
|
||||
|
@ -36,6 +37,8 @@ class SpinWorker : public Napi::AsyncWorker {
|
|||
i++;
|
||||
}
|
||||
|
||||
for_each(mid.begin(), mid.end(), gifDisposeMethodImage(Magick::BackgroundDispose));
|
||||
|
||||
optimizeTransparency(mid.begin(), mid.end());
|
||||
if (delay != 0) {
|
||||
for_each(mid.begin(), mid.end(), animationDelayImage(delay));
|
||||
|
|
Loading…
Reference in a new issue