americanexpress / jest-image-snapshot

✨ Jest matcher for image comparisons. Most commonly used for visual regression testing.
Apache License 2.0
3.81k stars 197 forks source link

Integrate odiff with image snapshot #251

Open Quintessent opened 3 years ago

Quintessent commented 3 years ago

I am working on a program where we need to run a huge amount of visual tests for big images (full-hd and bigger) and image comparison takes too much time on CI.

Is it possible to use some kind of more performant library like this https://github.com/dmtrKovalenko/odiff with your tool?

tbouffard commented 3 years ago

Implementation could reuse what has been done to introduce the ssim diff lib in #220

Quintessent commented 3 years ago

So can i make a pull request for this?

github-actions[bot] commented 3 years ago

This issue is stale because it has been open 30 days with no activity.

tbouffard commented 3 years ago

@JamesSingleton @anescobar1991 would you be interesting in reviewing/integrating a Pull Request on that topic if @Quintessent and/or I provide a Pull Request to implement an odiff integration?

github-actions[bot] commented 3 years ago

This issue is stale because it has been open 30 days with no activity.

tbouffard commented 3 years ago

odiff support has been referenced in https://github.com/americanexpress/jest-image-snapshot/issues/210#issuecomment-747906665

github-actions[bot] commented 3 years ago

This issue is stale because it has been open 30 days with no activity.

tujoworker commented 1 year ago

@Quintessent Are you still interested to make a PR?

From what I see, it should be fairly straight forwards to integrate this:

const { compare } = require("odiff-bin");

const { match, reason } = await compare(
  "path/to/first/image.png",
  "path/to/second/image.png",
  "path/to/diff.png"
);