question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

ignoreRectangles feature

See original GitHub issue

Proposing to add “ignoreRectagles” feature as in node-resemble-js, where options would support an ignoreRectangles property which is as in resemble:

//array of rectangles, each rectangle is defined as (x, y, width, height)
//e.g. [[325, 170, 100, 40]]

Pixels within these rectangles would not be tested. Unsure of best way to represent these in diff image.

Issue Analytics

  • State:closed
  • Created 8 years ago
  • Reactions:3
  • Comments:7 (3 by maintainers)

github_iconTop GitHub Comments

3reactions
curtwcommented, Dec 10, 2015

Another advantage of including this feature in the package is that the color of the ignore rectangles could be set to black in the diff image, making it clear what had been excluded from the comparison.

if (ignoreHash && ignoreHash[x] && ignoreHash[x][y]) {
    drawPixel(output, pos, 0, 0, 0);
    continue;
}

Setting the color to black in the input images does not produce a diff image that adequately distinguishes ignore rectangles from darker parts of the input images.

You could black-out the resulting diff image as well, but that’s getting a be a lot of extra steps.

1reaction
mournercommented, Dec 24, 2017

No plans for now, to keep it simple. There’s a workaround:

it’s easy enough to just iterate over and null all pixels in desired areas in both input images

Read more comments on GitHub >

github_iconTop Results From Across the Web

Imaging.FindOptions.Timeout Property - Ranorex
The timeout specifies the time to iteratively search for the specified feature, i.e. when to stop searching anew. The timeout will not abort...
Read more >
node-resemble-js | Yarn - Package Manager
node-resemble.js. Analyse and compare images with Javascript. This project does not need canvas or any other binary denpendencies.
Read more >
TRVMotionDetector.GetRect, IsRectValid - TRichView
DetectChanges returns the count of these rectangles. Index must be in the range from 0 to count - 1. Not all of these...
Read more >
https://raw.githubusercontent.com/kzndzhiro/node-r...
#0.0.4 * rename package name to node-resemble-js #0.0.3 * added ignoreRectangles feature <a name="0.0.0"></a> #0.0.0 * initial commit (started form resemble ...
Read more >
puppeteer-screenshot-tester - npm
... ignoreColors = false[, matchingBox = { ignoreRectangles = [], includeRectangle = [] } [, errorSettings ... returns: <[function]> resolves to function ......
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found