idealo / imagededup

😎 Finding duplicate images made easy!
https://idealo.github.io/imagededup/
Apache License 2.0
5.15k stars 455 forks source link

Add support for `.webp` images. #153

Closed Wicloz closed 1 year ago

Wicloz commented 3 years ago

WebP images are getting increasingly more common, and Pillow supports this format. Adding it to the list of valid formats is the only change required to make this work.

tanujjain commented 1 year ago

Could you please update the test cases?

Wicloz commented 1 year ago

Excuses for the spam but this should be correct. I also tried adding an image file in a format not mentioned to be supported but it got recognized anyway, so either these tests are not correct or the list of recognized formats is not complete.

tanujjain commented 1 year ago

@Wicloz Thanks for the changes. The formats included in the package are the ones where we explicitly tested that duplicates could be found reliably. In fact, before merging this PR, I'll create an artificial dataset comprising of near duplicates with webp format to check that duplicates can be found reliably. So, didn't include every format PIL is capable of supporting. Instead, going with the community requests for the format support here.

Also, changing the base branch for merge to be dev as per contribution guidelines.