color unnecessary
This commit is contained in:
parent
862e7d1bfa
commit
6c47d7384f
1 changed files with 13 additions and 4 deletions
17
index.php
17
index.php
|
@ -97,7 +97,16 @@
|
|||
|
||||
<script>
|
||||
function loadImageBits(canvasId, bits) {
|
||||
alert("loading " + canvasId);
|
||||
const canvas = document.getElementById(canvasId);
|
||||
const ctx = canvas.getContext("2d");
|
||||
|
||||
// const pen = ctx.createImageData(2, 2);
|
||||
// for (let i = 0; i < pen.data.length; i += 4) {
|
||||
// pen.data[i] = 0;
|
||||
// pen.data[i+1] = 0;
|
||||
// pen.data[i+2] = 0;
|
||||
// pen.data[i+3] = 255;
|
||||
// }
|
||||
}
|
||||
</script>
|
||||
</head>
|
||||
|
@ -130,9 +139,9 @@
|
|||
|
||||
const pen = ctx.createImageData(2, 2);
|
||||
for (let i = 0; i < pen.data.length; i += 4) {
|
||||
pen.data[i] = 0;
|
||||
pen.data[i+1] = 0;
|
||||
pen.data[i+2] = 0;
|
||||
// pen.data[i] = 0;
|
||||
// pen.data[i+1] = 0;
|
||||
// pen.data[i+2] = 0;
|
||||
pen.data[i+3] = 255;
|
||||
}
|
||||
|
||||
|
|
Reference in a new issue