gemini-testing / looks-same

Node.js library for comparing images
MIT License
669 stars 55 forks source link

antialiasingTolerance doesn't work with alpha transparency #59

Closed drairi closed 1 year ago

drairi commented 5 years ago

I have the following two images to compare. They are full-page screenshots of a web page, captured by Hermione. Taken on Browserstack Windows 10 Edge.

Baseline: https://user-images.githubusercontent.com/44468637/65691884-eafebc80-e071-11e9-942c-438cfcc667e7.png

Actual: https://user-images.githubusercontent.com/44468637/65691893-ef2ada00-e071-11e9-84ef-899338b3651b.png

Here is a closeup of some of the differences it produces:

image

To me it looks like antialiasing, but no matter what i set as the antialiasingTolerance, it says these images are different.

I have to increase tolerance to 20 before it starts to pass.

Is it possible we're dealing with a difference in alpha transparency rather than antialiasing? Can looks-same get an option for dealing with alpha?

drairi commented 5 years ago

Looks like it may be fixed with this PR: https://github.com/gemini-testing/looks-same/pull/30

DudaGod commented 1 year ago

Looks like it may be fixed with this PR: #30

No, it doesn't help in your case. Moreover I looked at your downloaded images. And if you switch between them, you can see that several letters have slightly changed their location. So it's a font rendering problem and tolerance and even antialiasingTolerance doesn't help there.

I capture small video with this problem - https://user-images.githubusercontent.com/5900697/214014128-e5844737-3dbb-401c-beb1-c59fe5b19e5b.mov

Most likely the problem is no longer relevant, so I close it. If it's still relevant, let me know and I'll reopen it.

Sorry for such a long reply =(

drairi commented 1 year ago

That's quite ok .. nice to get a reply even if it's so late. I leave my job at DR at the end of this week so it's not really a problem for me anymore! 😛