When an action happens (click) we have 2 screenshots (before) & after
We need to use a diff tool to analyze change, find the changed region (rectangle), cut it and use it as a change
Use cases:
- when modal opened - save only a modal area as a screenshot (and 30px outer margin)
- when drawer opened - only drawer content is shown
- when dropdown opened - only dropdown content shown
Use esisting nodejs libraries that can do screenshot diffs and provide rectangular information of the changed area.
We need image diff library that can do:
diff(img1, img2) => (x1, y1, x2, y2)
where x1, y1, x2, y2 is a rectange that contains all affected pixels
When an action happens (click) we have 2 screenshots (before) & after
We need to use a diff tool to analyze change, find the changed region (rectangle), cut it and use it as a change
Use cases:
Use esisting nodejs libraries that can do screenshot diffs and provide rectangular information of the changed area.
We need image diff library that can do:
where x1, y1, x2, y2 is a rectange that contains all affected pixels