videohash icon indicating copy to clipboard operation
videohash copied to clipboard

BUG REPORT: AttributeError due to PIL.Image v10+ dropping ANTIALIAS

Open hagemt opened this issue 1 year ago • 4 comments

Describe the bug

VideoHash results in:

AttributeError: module 'PIL.Image' has no attribute 'ANTIALIAS'

Due to PIL.Image v10+ having deprecated ANTILIAS; fix appears to be LANCZOS or pinning PIL < 10:

https://pillow.readthedocs.io/en/stable/releasenotes/10.0.0.html#constants

To Reproduce

Install via pip with PIL and pillow from brew (currently 10.0.0)

VideoHash("path/to.mp4")

Expected behavior

Object with .hash and no AttributeError

Screenshots

N/A

Please complete the following information:

  • Operating system: macOS Ventura 13.5
  • Python Version: 3.11.4
  • VideoHash version: 3.0.1

Additional context

I think this would be a good first issue for another contributor. Should I attempt a PR?

hagemt avatar Aug 06 '23 20:08 hagemt

This is fixed in PR #109 but it still needs to be merged.

Demmenie avatar Sep 08 '23 18:09 Demmenie

Worked for me pip install Pillow==9.5.0

rkgitvinay avatar Dec 18 '23 09:12 rkgitvinay

Worked for me pip install Pillow==9.5.0

This causes security issues. There are known DoS attacks that exploit versions of Pillow older than 10.0.1

Demmenie avatar Dec 26 '23 00:12 Demmenie

I've fixed the issue in my fork of this repository "videohash2": https://github.com/Demmenie/videohash2 https://pypi.org/project/videohash2/

Demmenie avatar Jul 03 '24 15:07 Demmenie