Browse Source

Make screenshots respect entity brightness

master
Fen Dweller 5 years ago
parent
commit
ffe73d4e18
1 changed files with 5 additions and 0 deletions
  1. +5
    -0
      macrovision.js

+ 5
- 0
macrovision.js View 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…
Cancel
Save