Skip to content

Commit

Permalink
Replaced deprecated Image.ANTIALIAS with Image.LANCZOS
Browse files Browse the repository at this point in the history
  • Loading branch information
elceef committed Jul 16, 2023
1 parent cd40206 commit 997c260
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion dnstwist.py
Original file line number Diff line number Diff line change
Expand Up @@ -306,7 +306,7 @@ def is_registered(self):

class pHash():
def __init__(self, image, hsize=8):
img = Image.open(image).convert('L').resize((hsize, hsize), Image.ANTIALIAS)
img = Image.open(image).convert('L').resize((hsize, hsize), Image.LANCZOS)
pixels = list(img.getdata())
avg = sum(pixels) / len(pixels)
self.hash = ''.join('1' if p > avg else '0' for p in pixels)
Expand Down

0 comments on commit 997c260

Please sign in to comment.