mirror of
https://github.com/piskelapp/piskel.git
synced 2023-08-10 21:12:52 +03:00
Feature : import sprites from GIF
This commit is contained in:
@@ -19,6 +19,13 @@
|
||||
return canvas;
|
||||
},
|
||||
|
||||
createFromImageData : function (imageData) {
|
||||
var canvas = pskl.CanvasUtils.createCanvas(imageData.width, imageData.height);
|
||||
var context = canvas.getContext('2d');
|
||||
context.putImageData(imageData, 0, 0);
|
||||
return canvas;
|
||||
},
|
||||
|
||||
/**
|
||||
* By default, all scaling operations on a Canvas 2D Context are performed using antialiasing.
|
||||
* Resizing a 32x32 image to 320x320 will lead to a blurry output.
|
||||
|
||||
Reference in New Issue
Block a user