Actualiser custom.js
This commit is contained in:
parent
82b440413f
commit
dced90eb4d
1 changed files with 6 additions and 1 deletions
|
@ -61,7 +61,12 @@ const svgObsidianFix = () => {
|
||||||
canvas.height = image.height;
|
canvas.height = image.height;
|
||||||
const ctx = canvas.getContext("2d");
|
const ctx = canvas.getContext("2d");
|
||||||
ctx.drawImage(image, 0, 0);
|
ctx.drawImage(image, 0, 0);
|
||||||
const imageData = ctx.getImageData(0, 0, canvas.width, canvas.height);
|
const imageData = ctx.getImageData(
|
||||||
|
0,
|
||||||
|
0,
|
||||||
|
Math.max(1, canvas.width),
|
||||||
|
Math.max(1, canvas.height)
|
||||||
|
);
|
||||||
const pixelData = imageData.data;
|
const pixelData = imageData.data;
|
||||||
|
|
||||||
const colors = [];
|
const colors = [];
|
||||||
|
|
Loading…
Reference in a new issue