{"id":17972897,"url":"https://github.com/akamhy/dhashpy","last_synced_at":"2025-04-03T23:13:31.693Z","repository":{"id":46649614,"uuid":"412116301","full_name":"akamhy/dhashpy","owner":"akamhy","description":"Row-wise gradient dHash algorithm implementation.","archived":false,"fork":false,"pushed_at":"2021-10-21T13:21:41.000Z","size":76,"stargazers_count":2,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-03-12T22:37:48.627Z","etag":null,"topics":["dhash","image-fingerprint","image-hash","image-hash-based-on-pixel-value","image-hashing","image-hashing-algorithms"],"latest_commit_sha":null,"homepage":"https://dhashpy.readthedocs.io/en/latest/","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/akamhy.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2021-09-30T15:19:00.000Z","updated_at":"2024-09-21T03:26:17.000Z","dependencies_parsed_at":"2022-08-29T16:41:55.410Z","dependency_job_id":null,"html_url":"https://github.com/akamhy/dhashpy","commit_stats":null,"previous_names":[],"tags_count":2,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/akamhy%2Fdhashpy","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/akamhy%2Fdhashpy/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/akamhy%2Fdhashpy/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/akamhy%2Fdhashpy/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/akamhy","download_url":"https://codeload.github.com/akamhy/dhashpy/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247092393,"owners_count":20882218,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["dhash","image-fingerprint","image-hash","image-hash-based-on-pixel-value","image-hashing","image-hashing-algorithms"],"created_at":"2024-10-29T16:26:26.457Z","updated_at":"2025-04-03T23:13:31.678Z","avatar_url":"https://github.com/akamhy.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003cdiv align=\"center\"\u003e\n\n\u003ch1\u003e dHashPy \u003c/h1\u003e\n\n\u003ch3\u003eRow-wise gradient dHash algorithm in python.\u003c/h3\u003e\n  \ndHash algorithm was originally described at \u003ca href=\"https://www.hackerfactor.com/blog/index.php?/archives/529-Kind-of-Like-That.html\" target=\"_blank\"\u003eKind of Like That - The Hacker Factor Blog\u003c/a\u003e \n\n\u003c/div\u003e\n\n\u003cp align=\"center\"\u003e\n\u003ca href=\"https://github.com/akamhy/dhashpy/actions?query=workflow%3AUbuntu\"\u003e\u003cimg alt=\"Build Status\" src=\"https://github.com/akamhy/dhashpy/workflows/Ubuntu/badge.svg\"\u003e\u003c/a\u003e\n\u003ca href=\"https://github.com/akamhy/dhashpy/actions?query=workflow%3AWindows\"\u003e\u003cimg alt=\"Build Status\" src=\"https://github.com/akamhy/dhashpy/workflows/Windows/badge.svg\"\u003e\u003c/a\u003e\n\u003ca href=\"https://codecov.io/gh/akamhy/dhashpy\"\u003e\u003cimg alt=\"codecov\" src=\"https://codecov.io/gh/akamhy/dhashpy/branch/main/graph/badge.svg?token=HVwlPMnsPA\"\u003e\u003c/a\u003e\n\u003ca href=\"https://dhashpy.readthedocs.io/en/latest/\"\u003e\u003cimg alt=\"docs\" src=\"https://readthedocs.org/projects/dhashpy/badge/?version=latest\u0026style=flat\"\u003e\u003c/a\u003e\n\u003ca href=\"https://github.com/psf/black\"\u003e\u003cimg alt=\"Code style: black\" src=\"https://img.shields.io/badge/code%20style-black-000000.svg\"\u003e\u003c/a\u003e\n\u003c/p\u003e\n\n\n### Installation\n\n  - Using [pip](https://en.wikipedia.org/wiki/Pip_(package_manager)):\n\n```bash\npip install dhashpy -U\n```\n\n  - Install directly from GitHub:\n\n```bash\npip install git+https://github.com/akamhy/dhashpy.git\n```\n\n### Usage\n```python\n\u003e\u003e\u003e from dhashpy import DHash\n\u003e\u003e\u003e file = \"/home/akamhy/Pictures/map_of_maths.png\"\n\u003e\u003e\u003e dhash_file = DHash(file)\n\u003e\u003e\u003e dhash_file\nDHash(hash=0b0110010000000011101010111100110111001101100011111000111100001110, hash_hex=0x6403abcdcd8f8f0e, path=/home/akamhy/Pictures/map_of_maths.png)\n\u003e\u003e\u003e\n\u003e\u003e\u003e dhash_file.hash # A 64-bit hash, notice the prefix \"0b\" indicating it's binary. Total string length = 64 + 2 = 66\n'0b0110010000000011101010111100110111001101100011111000111100001110'\n\u003e\u003e\u003e\n\u003e\u003e\u003e len(dhash_file)\n66\n\u003e\u003e\u003e dhash_file.bits_in_hash\n64\n\u003e\u003e\u003e\n\u003e\u003e\u003e dhash_file.hash_hex\n'0x6403abcdcd8f8f0e'\n\u003e\u003e\u003e\n\u003e\u003e\u003e dhash_file - \"0x6403abcdcd8f8f0e\"\n0\n\u003e\u003e\u003e\n\u003e\u003e\u003e dhash_file == \"0x6403abcdcd8f8f0e\"\nTrue\n\u003e\u003e\u003e\n\u003e\u003e\u003e dhash_file - \"0b0110010000000011101010111100110111001101100011111000111100001110\"\n0\n\u003e\u003e\u003e          \n\u003e\u003e\u003e dhash_file\ndhash_file\n\u003e\u003e\u003e dir(dhash_file)\n['__class__', '__delattr__', '__dict__', '__dir__', '__doc__', '__eq__', '__format__', '__ge__', '__getattribute__', '__gt__', '__hash__', '__init__', '__init_subclass__', '__le__', '__len__', '__lt__', '__module__', '__ne__', '__new__', '__reduce__', '__reduce_ex__', '__repr__', '__setattr__', '__sizeof__', '__str__', '__sub__', '__subclasshook__', '__weakref__', 'bin2hex', 'bits_in_hash', 'calc_hash', 'hamming_distance', 'hash', 'hash_hex', 'height', 'hex2bin', 'image', 'path', 'width']\n\u003e\u003e\u003e dhash_file.height\n8\n\u003e\u003e\u003e dhash_file.width\n9\n\u003e\u003e\u003e dhash_file.image\n\u003cPIL.Image.Image image mode=L size=9x8 at 0x7F9D324C0580\u003e\n\u003e\u003e\u003e\n```\n\n\u003e Docs :  \u003chttps://dhashpy.readthedocs.io/en/latest/\u003e\n\n\n### License\n[![License: MIT](https://img.shields.io/badge/License-MIT-green.svg)](https://github.com/akamhy/dhashpy/blob/main/LICENSE)\n\n\nReleased under the MIT License. See\n[license](https://github.com/akamhy/dhashpy/blob/master/LICENSE) for details.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fakamhy%2Fdhashpy","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fakamhy%2Fdhashpy","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fakamhy%2Fdhashpy/lists"}