{"id":15673917,"url":"https://github.com/linusu/blockhash-core","last_synced_at":"2025-05-06T21:47:03.428Z","repository":{"id":65991795,"uuid":"226515993","full_name":"LinusU/blockhash-core","owner":"LinusU","description":"Core implementation of the blockhash perceptual image hashing algorithm","archived":false,"fork":false,"pushed_at":"2022-09-15T14:27:28.000Z","size":6,"stargazers_count":16,"open_issues_count":1,"forks_count":0,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-05-05T03:39:01.344Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"JavaScript","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/LinusU.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,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2019-12-07T13:14:54.000Z","updated_at":"2025-03-18T20:11:25.000Z","dependencies_parsed_at":null,"dependency_job_id":"17c033d8-765f-4f3e-9147-5323e7fd3489","html_url":"https://github.com/LinusU/blockhash-core","commit_stats":{"total_commits":3,"total_committers":2,"mean_commits":1.5,"dds":"0.33333333333333337","last_synced_commit":"a0805b48bdf9c9fbfd0d7e5e82e2794f153095c1"},"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/LinusU%2Fblockhash-core","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/LinusU%2Fblockhash-core/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/LinusU%2Fblockhash-core/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/LinusU%2Fblockhash-core/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/LinusU","download_url":"https://codeload.github.com/LinusU/blockhash-core/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":252776476,"owners_count":21802461,"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":[],"created_at":"2024-10-03T15:43:01.406Z","updated_at":"2025-05-06T21:47:03.370Z","avatar_url":"https://github.com/LinusU.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Blockhash Core\n\nThis is the core implementation of the [blockhash perceptual image hashing algorithm](https://web.archive.org/web/20210827144701/http://blockhash.io).\n\nLook at the main [`blockhash` package](https://github.com/commonsmachinery/blockhash-js) if you want a higher level api.\n\n## Installation\n\n```sh\nnpm install --save blockhash-core\n```\n\n## Usage\n\n```js\nconst { bmvbhash } = require('blockhash-core')\n\nconst image = new ImageData(/* ... */)\nconst result = bmvbhash(image, 16)\n\nconsole.log(result)\n//=\u003e f81bf99ffb803400e07f8c5d849f049707033a033fe33fe1bfe00e618ee30ca7\n```\n\n## API\n\n### `bmvbhash(data, bits)`\n\n- `data` ([`ImageData`](https://developer.mozilla.org/en-US/docs/Web/API/ImageData), required) - The input image data\n- `bits` (`number`, required) - Create hash of size N^2 bits\n- returns `string` - The resulting hash in hex format\n\nPrecise but slower, non-overlapping blocks.\n\nThis method is recommended as a good tradeoff between speed and good matches on any image size.\n\n### `bmvbhashEven(data, bits)`\n\n- `data` ([`ImageData`](https://developer.mozilla.org/en-US/docs/Web/API/ImageData), required) - The input image data\n- `bits` (`number`, required) - Create hash of size N^2 bits\n- returns `string` - The resulting hash in hex format\n\nQuick and crude, non-overlapping blocks.\n\nThis method is only advisable when the image width and height are an even multiple of the number of blocks used.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flinusu%2Fblockhash-core","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Flinusu%2Fblockhash-core","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flinusu%2Fblockhash-core/lists"}