Skip to content

Commit

Permalink
Merge pull request JohannesBuchner#37 from bjlittle/fix-script
Browse files Browse the repository at this point in the history
Make demo script Python3-compatible
  • Loading branch information
JohannesBuchner authored Oct 30, 2016
2 parents ef9c44c + bfacfca commit 8a1cb29
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
7 changes: 6 additions & 1 deletion find_similar_images.py
100644 → 100755
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
#!/usr/bin/env python

from __future__ import (absolute_import, division, print_function)

from PIL import Image
import six

import imagehash

"""
Expand All @@ -18,7 +23,7 @@ def is_image(filename):
hash = hashfunc(Image.open(img))
images[hash] = images.get(hash, []) + [img]

for k, img_list in images.iteritems():
for k, img_list in six.iteritems(images):
if len(img_list) > 1:
print(" ".join(img_list))

Expand Down
1 change: 1 addition & 0 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@
description='Image Hashing library',
long_description=long_description,
install_requires=[
"six",
"numpy",
"scipy", # for phash
"pillow", # or PIL
Expand Down

0 comments on commit 8a1cb29

Please sign in to comment.