Ignore pixel based on reference image color/transparency
feugy opened this issue · comments
While using resemble.js for visual regression testing, we're looking for a convenient way to exclude some areas when comparing images.
The obvious answer would be to specify ignored box when calling compareImages()
, but it's inconvenient for people writing tests: ideally they would only provide the reference image.
What do you think of a new options skipping transparent pixels from the reference (first) image?
Or skipping pixels of a given color?
Tester would simply "remove" of "grey out" some portion of the reference image
Sounds like a good idea, I think it would work best if the user can set the colour/transparency used to define the exclusion area. Perhaps resemble.outputSettings({ ignoreAreasColoredWith: {r:255, g: 255, b: 255, a: 255}});
.