update tng.

This commit is contained in:
Christopher Jeffrey 2015-07-18 15:10:25 -07:00
parent cd1599e833
commit d2a2847506

6
vendor/tng.js vendored
View File

@ -1054,6 +1054,7 @@ PNG.prototype.toPNG = function(input) {
, img , img
, gif , gif
, i , i
, control
, disposeOp; , disposeOp;
if (format !== 'gif') { if (format !== 'gif') {
@ -1074,7 +1075,8 @@ PNG.prototype.toPNG = function(input) {
img = gif.images[i]; img = gif.images[i];
// Convert from gif disposal to png disposal. See: // Convert from gif disposal to png disposal. See:
// http://www.w3.org/Graphics/GIF/spec-gif89a.txt // http://www.w3.org/Graphics/GIF/spec-gif89a.txt
disposeOp = Math.max(0, (gif.disposeMethod || 0) - 1); control = img.control || gif;
disposeOp = Math.max(0, (control.disposeMethod || 0) - 1);
if (disposeOp > 2) disposeOp = 0; if (disposeOp > 2) disposeOp = 0;
this.frames.push({ this.frames.push({
fctl: { fctl: {
@ -1083,7 +1085,7 @@ PNG.prototype.toPNG = function(input) {
height: img.height, height: img.height,
xOffset: img.left, xOffset: img.left,
yOffset: img.top, yOffset: img.top,
delayNum: gif.delay, delayNum: control.delay,
delayDen: 100, delayDen: 100,
disposeOp: disposeOp, disposeOp: disposeOp,
blendOp: 1 blendOp: 1