Sfoglia il codice sorgente

Make screenshots respect entity brightness

master
Fen Dweller 5 anni fa
parent
commit
ffe73d4e18
1 ha cambiato i file con 5 aggiunte e 0 eliminazioni
  1. +5
    -0
      macrovision.js

+ 5
- 0
macrovision.js Vedi File

@@ -3744,8 +3744,13 @@ function renderToCanvas() {

let xSize = img.getBoundingClientRect().width;
let ySize = img.getBoundingClientRect().height;
const oldFilter = ctx.filter
const brightness = getComputedStyle(element).getPropertyValue("--brightness")
ctx.filter = `brightness(${brightness})`;

ctx.drawImage(img, x, y, xSize, ySize);

ctx.filter = oldFilter
});
}



Loading…
Annulla
Salva