Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

what's the difference between looks-same and pixelmatch? #88

Closed
FishBlanche opened this issue Mar 1, 2023 · 1 comment
Closed

what's the difference between looks-same and pixelmatch? #88

FishBlanche opened this issue Mar 1, 2023 · 1 comment

Comments

@FishBlanche
Copy link

what's the difference between looks-same and pixelmatch?

@KuznetsovRoman
Copy link
Member

Color comparison

  • looks-same is using CIEDE2000 color difference
  • pixelmatch is using YIQ NTSC transmission color space

CIEDE2000 is much closer to human color perception, so with pixelmatch you would have weird comparison results (described in mapbox/pixelmatch#127)

Antialiasing

  • looks-same has configurable antialiasingTolerance
  • pixelmatch has some antialiasing tolerance, but its not configurable, therefore could not be adjusted to your needs

Ignore caret

Boilerplate

Environment

  • looks-same is Node.js only solution (because it uses libvips under the hood)
  • pixelmatch can be used in browsers

Conclusion

If you need to run your code in some browser, you should use pixelmatch.
If you need configurable antialiasingTolerance and ignoreCaret options (it is usefull to compare screenshots), or if you want to compare images considering human color perception, you should use looks-same

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants