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

how compare from string eg. file_get_contents() #47

Open
erlangparasu opened this issue Aug 26, 2019 · 1 comment
Open

how compare from string eg. file_get_contents() #47

erlangparasu opened this issue Aug 26, 2019 · 1 comment

Comments

@erlangparasu
Copy link

No description provided.

@artyuum
Copy link
Contributor

artyuum commented Aug 21, 2020

I didn't test but jenssegers/imagehash is internally using Intervention/image to load the image so the following should work:

$hasher->hash(file_get_contents('image.png'));

See: http://image.intervention.io/api/make

Then if you want to compare the hash of the image above, you can use the compare() method.

public function compare($resource1, $resource2): int

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