Skip to content
New issue

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

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

Already on GitHub? # to your account

Perceptual Hashing for GIFs #48

Open
Kr4ken-9 opened this issue Mar 22, 2020 · 0 comments
Open

Perceptual Hashing for GIFs #48

Kr4ken-9 opened this issue Mar 22, 2020 · 0 comments
Labels
feature New addition

Comments

@Kr4ken-9
Copy link
Owner

I don't think the imagehash library has inherent support for aniamted GIFs, so I will probably need to add it myself in the future. However, GIFs and Pillow seem to be a pain in the ass so here's hoping it's easier than it looks.

Idea:

  1. Split gifs into frames
  2. Hash each frame
  3. Compare each hash? OR Hash all hashes (lol)

Resources:
https://gist.github.com/revolunet/848913
https://gist.github.com/BigglesZX/4016539
python-pillow/Pillow#2893
https://pythontic.com/image-processing/pillow/extract%20frames%20from%20animated%20gif

Why?
I just came across a relatively new discord bot named Onixian that uses animated gifs to identify pokemon.

Followup Idea:
Maybe don't hash each frame, only selective frames. Bots can change single frames and mess up the hash. I have to keep reminding myself that perceptual hashes are different than cryptographic hashes lol.

@Kr4ken-9 Kr4ken-9 added the feature New addition label Mar 22, 2020
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
feature New addition
Projects
None yet
Development

No branches or pull requests

1 participant