|
|
@ -467,11 +467,9 @@ define([
|
|
|
|
canvas.height = i.height;
|
|
|
|
canvas.height = i.height;
|
|
|
|
var context = canvas.getContext('2d');
|
|
|
|
var context = canvas.getContext('2d');
|
|
|
|
context.drawImage(i, 0, 0, i.width, i.height);
|
|
|
|
context.drawImage(i, 0, 0, i.width, i.height);
|
|
|
|
var png = canvas.toDataURL();
|
|
|
|
canvas.toBlob(function (blob) {
|
|
|
|
var link = document.createElement('a');
|
|
|
|
window.saveAs(blob, name);
|
|
|
|
link.download = name;
|
|
|
|
});
|
|
|
|
link.href = png;
|
|
|
|
|
|
|
|
link.click();
|
|
|
|
|
|
|
|
};
|
|
|
|
};
|
|
|
|
i.src = blobURL;
|
|
|
|
i.src = blobURL;
|
|
|
|
})();
|
|
|
|
})();
|
|
|
|