mirror of
https://github.com/hexahigh/games.git
synced 2025-12-11 20:15:38 +01:00
a
This commit is contained in:
parent
717153cb9e
commit
5357c2f2fe
@ -15,7 +15,7 @@
|
||||
img.onload = function (event) {
|
||||
var canvas = document.createElement("canvas");
|
||||
var ctx = canvas.getContext("2d");
|
||||
ctx.drawImage(img, 0, 0, 300, 300);
|
||||
ctx.drawImage(img, 0, 0, 48, 48);
|
||||
var dataurl = canvas.toDataURL(imageFile.type);
|
||||
document.getElementById("preview").src = dataurl;
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user