Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

The lib gives different hash values on different platforms #210

Open
TrungKhoaLe opened this issue Jul 22, 2024 · 1 comment
Open

The lib gives different hash values on different platforms #210

TrungKhoaLe opened this issue Jul 22, 2024 · 1 comment

Comments

@TrungKhoaLe
Copy link

Thank you for developing such a wonderful library. I wonder why the lib gives me different values on different machines. In my Macbook M1, it gives me one value. Then on the container that I build on that Macbook machine, it gives me another value. I am using all hash types which are p, a, w and d and 3 hash sizes which are 8, 16, and 32.

@JohannesBuchner
Copy link
Owner

That's surprising. Most hashing functions start with numpy.array(image.convert('L').resize((img_size, img_size), ANTIALIAS)), see for example the code at https://github.com/JohannesBuchner/imagehash/blob/master/imagehash/__init__.py#L261 . Can you check whether that returned array is machine-dependent?

If yes, this is a pillow issue, probably related to anti-aliasing.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants