This commit is contained in:
Maciej Caderek
2022-01-24 04:35:35 +01:00
parent b7d53a045f
commit 0c2f804021
6 changed files with 82 additions and 43 deletions

View File

@@ -265,6 +265,10 @@ class Board {
return this.canvas.toDataURL();
}
toImageData() {
return this.ctx.getImageData(0, 0, this.width, this.height).data;
}
toImgElement() {
const dataUrl = this.toImgUrl();