From 0002ceb1b235b465082ed4e0080c15a5fed97f1f Mon Sep 17 00:00:00 2001 From: Shubham Kumar Date: Mon, 1 Feb 2021 20:30:29 +0530 Subject: [PATCH] Changed frameInfo.delay value whent it is equal to 0 --- src/image/loading_displaying.js | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/image/loading_displaying.js b/src/image/loading_displaying.js index 9f80ff8721..86a63550cc 100644 --- a/src/image/loading_displaying.js +++ b/src/image/loading_displaying.js @@ -193,9 +193,13 @@ function _createGif( loadGIFFrameIntoImage(j, gifReader); const imageData = new ImageData(framePixels, pImg.width, pImg.height); pImg.drawingContext.putImageData(imageData, 0, 0); + let frameDelay = frameInfo.delay; + if (frameDelay === 0) { + frameDelay = 10; + } frames.push({ image: pImg.drawingContext.getImageData(0, 0, pImg.width, pImg.height), - delay: frameInfo.delay * 10 //GIF stores delay in one-hundredth of a second, shift to ms + delay: frameDelay * 10 //GIF stores delay in one-hundredth of a second, shift to ms }); }