Ver código fonte

Make screenshots respect entity brightness

master
Fen Dweller 5 anos atrás
pai
commit
ffe73d4e18
1 arquivos alterados com 5 adições e 0 exclusões
  1. +5
    -0
      macrovision.js

+ 5
- 0
macrovision.js Ver arquivo

@@ -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
});
}



Carregando…
Cancelar
Salvar