Skip to content

Commit 7e6af24

Browse files
error in dhash horizontal
1 parent 9777d09 commit 7e6af24

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

imagehash/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -160,7 +160,7 @@ def dhash(image, hash_size=8):
160160
@image must be a PIL instance.
161161
"""
162162
image = image.convert("L").resize((hash_size, hash_size + 1), Image.ANTIALIAS)
163-
pixels = numpy.array(image.getdata(), dtype=numpy.float).reshape((hash_size + 1, hash_size))
163+
pixels = numpy.array(image.getdata(), dtype=numpy.float).reshape((hash_size, hash_size + 1))
164164
# compute differences
165165
diff = pixels[:, 1:] > pixels[:, :-1]
166166
return ImageHash(diff)

0 commit comments

Comments
 (0)