-
Notifications
You must be signed in to change notification settings - Fork 91
Support for ignoring pixel region #12
Comments
This won't work in all cases. For example, if a blur-filter (or any box-filter) is applied to remove high-frequencies, then values from neighboring pixels will be applied to the currently compared pixel and therefore share some of the information, even though they should actually be ignored. What I have done in the past, for example in the Hodman project, was to black-out some areas before applying the filters, or even save screenshots as is. This way, the pixel will share the same black pixel across comparisons. What I can do is to black-out the pixels and then compare black-to-black. This will make sure that there is no additional hash lookup for each pixel (so, no slow-down), and cases like shared pixel values will also be covered. Does this work for you? |
So If I understand correctly, you would black-out a region in ImageA then define that region as a property in blinkdiff to ignore? If that's the case, then that's great. |
No, actually, I would black-out the area in imageA and imageB, and when the pixels are compared, then they are the same because they are both black. One thing to note here is that the black-out area would be visible in the result to avoid having "ghost differences". What I mean with that are the differences in position - when the area moves due to CSS changes. For example, since the contents are blacked-out, they will not be used to be compared and shifts of the DOM element would be missed. But, when they are blacked-out, these differences will be noted by Blink-Diff since the whole frame will be shifted. If we, however, remove the black-out in the result, then differences will be highlighted in areas where there are non. That means, black-outs have to stay in the result to show what has been compared. I hope that makes sense. |
So I would manually black-out the area in imageA and imageB? Couldn't blinkdiff do the black-out in imageB itself via some property bounds set? |
Yes, Blink-Diff could do that. The question is simply if this is acceptable for you. |
That's absolutely acceptable. Thank you. |
Sorry for the wait. I finally implemented it. The command-line has now the parameter |
Thank you for implementing this. It's awesome as is! |
Would be great if blinkdiff supported ignoring pixel regions for such instances that there is dynamic content like a date or time displayed.
Something like:
The text was updated successfully, but these errors were encountered: