diff --git a/videohash/collagemaker.py b/videohash/collagemaker.py index 51c0674..0c1ec5d 100644 --- a/videohash/collagemaker.py +++ b/videohash/collagemaker.py @@ -180,7 +180,7 @@ def make(self) -> None: # scale the opened frame images frame.thumbnail( - (scaled_frame_image_width, scaled_frame_image_height), Image.ANTIALIAS + (scaled_frame_image_width, scaled_frame_image_height), Image.Resampling.LANCZOS ) # set the value of x to that of i's value. diff --git a/videohash/videohash.py b/videohash/videohash.py index 5b458bf..9e9a40a 100644 --- a/videohash/videohash.py +++ b/videohash/videohash.py @@ -185,6 +185,9 @@ def __eq__(self, other: object) -> bool: return True return False + def __hash__(self) -> int: + return int(self.hash, 2) + def __sub__(self, other: object) -> int: """ Definition of the '-' operator on VideoHash objects.