image loading probably works now
This commit is contained in:
parent
b4b5bd0ccb
commit
6e8753b5ca
1 changed files with 4 additions and 2 deletions
|
@ -101,9 +101,11 @@
|
|||
const ctx = canvas.getContext("2d");
|
||||
|
||||
const copy = ctx.createImageData(128, 64);
|
||||
for (let i = 0; i < pen.data.length; i += 4) {
|
||||
for (let i = 0; i < copy.data.length; i += 4) {
|
||||
if (substr(bits, i/4, 1) == "1") {
|
||||
copy.data[i+3] = 255;
|
||||
}
|
||||
}
|
||||
|
||||
ctx.putImageData(copy, 0, 0);
|
||||
}
|
||||
|
|
Reference in a new issue