Prechádzať zdrojové kódy

Merge branch 'master' into mediaonly

Mike L 4 rokov pred
rodič
commit
0987f65efe
2 zmenil súbory, kde vykonal 6 pridanie a 2 odobranie
  1. 2 1
      dist/webshot.js
  2. 4 1
      src/webshot.ts

+ 2 - 1
dist/webshot.js

@@ -143,7 +143,8 @@ class Webshot extends CallableInstance {
                             let boundary = null;
                             let x = zoomFactor * 2;
                             for (let y = 0; y < this.height; y++) {
-                                if (this.data[idx(x, y)] !== 255) {
+                                if (this.data[idx(x, y)] !== 255 &&
+                                    this.data[idx(x, y)] === this.data[idx(x + zoomFactor * 10, y)]) {
                                     if (this.data[idx(x, y + 18 * zoomFactor)] !== 255) {
                                         // footer kicks in
                                         boundary = null;

+ 4 - 1
src/webshot.ts

@@ -156,7 +156,10 @@ extends CallableInstance<
                 let boundary = null;
                 let x = zoomFactor * 2;
                 for (let y = 0; y < this.height; y++) {
-                  if (this.data[idx(x, y)] !== 255) {
+                  if (
+                    this.data[idx(x, y)] !== 255 &&
+                    this.data[idx(x, y)] === this.data[idx(x + zoomFactor * 10, y)]
+                  ) {
                     if (this.data[idx(x, y + 18 * zoomFactor)] !== 255) {
                       // footer kicks in
                       boundary = null;