From 653e640bf8f4a2a86a181b3b0a5e00f9e22ba05a Mon Sep 17 00:00:00 2001 From: YoungHoon Jung Date: Sun, 11 Sep 2016 21:43:45 -0700 Subject: [PATCH] Add '-coalesce' option for animated gifs. --- imagemagick.js | 3 +++ 1 file changed, 3 insertions(+) diff --git a/imagemagick.js b/imagemagick.js index b846c0c..5cf559b 100644 --- a/imagemagick.js +++ b/imagemagick.js @@ -383,6 +383,9 @@ exports.resizeArgs = function(options) { if (opt.strip) { args.push('-strip'); } + if (opt.format === 'gif') { + args.push('-coalesce'); + } if (opt.width || opt.height) { args.push('-resize'); if (opt.height === 0) args.push(String(opt.width));