{"versions":{"0.1.0":{"name":"blockhash-core","version":"0.1.0","repository":{"type":"git","url":"git+https://github.com/LinusU/blockhash-core.git"},"license":"MIT","scripts":{"test":"standard && ts-readme-generator --check"},"devDependencies":{"standard":"^14.3.1","ts-readme-generator":"^0.4.2"},"gitHead":"c8c32ee9a91c22473b4ac3dec669aa00642224b5","description":"This is the core implementation of the [blockhash perceptual image hashing algorithm](http://blockhash.io).","bugs":{"url":"https://github.com/LinusU/blockhash-core/issues"},"homepage":"https://github.com/LinusU/blockhash-core#readme","_id":"blockhash-core@0.1.0","_nodeVersion":"12.12.0","_npmVersion":"6.11.3","dist":{"integrity":"sha512-Cv7BgBo0jjVPaeuel4cvxf9LqIGsYNIPz9DAGvvrF9LRlEq9Q3HXu+S8bklPCae0sCxAXic4HGMoImf3FeO3Nw==","shasum":"dc25bd864b5af05c33e4266fb4d8f4e619462d04","tarball":"http://123.232.10.234:8212/nexus/content/groups/npm-public/blockhash-core/-/blockhash-core-0.1.0.tgz","fileCount":5,"unpackedSize":8527,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJd66X5CRA9TVsSAnZWagAAWBMP/jC6h9fsxnOWWTWPIu4z\n5yT2X9LlQCpc2NMlqMFG6yA6W09HPSpfvGxpa6Y55WDEo60aJcEfrJHCBvb5\nTwMliUMNWbKN98yL6WM1iigwhrTg49pbiY/u+4yXqW3Z7C6tnTLtGMlCP5fQ\n4b/PAty0V/nCe0mI67fwBB1E44NjVobhoDIL8yngORpD8obSN6Bc2atQwaxQ\nWMSwSuHveEEVGGmjjbwF9EycSPGT/2rVQ4Z5nADoYNmySZWlGf3NmwlKC2G3\nyzCG/JJbDyDRpiogxmTs4xM1R9YOXw6F+XKh5s1U9FZf8V8kPl1HhHhYalWy\nd2CPntO84BxKPzWFjkzWjokkuG2cAHux2i/yyediTlW1ylIBArVLCFaxw7Wk\nuKZwORAYoegzo7kJwhG/vHYhWfMEXqxI7JEasjB6Qt0S2t9NI1h3otsgJVI2\nNYd5G/yLAK4R8gy13cDpvTpjKNx7M901V41mLgO1yBFugtTUwo4nLZbEcMc2\noJYEqG84Vk0vcSWKf9BvLqcZDA7W9gU08cL0uPFbymjOoWs1YlZGcsoD2Q/J\n1oiQUegAziN1SSYDcN3RZjmnt7oyu2AYPyQRdk/3tD8R+d+wmQzqU+xfiFts\nlvkSUwONMhDkFZBvCyELBACiWk4rGDLGDvyXA/SePsC/RWnCMfM4SkIoOY3W\nRPOr\r\n=Cuud\r\n-----END PGP SIGNATURE-----\r\n","size":3332},"maintainers":[{"name":"anonymous","email":"linus@folkdatorn.se"}],"_npmUser":{"name":"anonymous","email":"linus@folkdatorn.se"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/blockhash-core_0.1.0_1575724536821_0.5657864759718363"},"_hasShrinkwrap":false,"_cnpmcore_publish_time":"2021-12-23T07:38:25.678Z","contributors":[]}},"dist-tags":{"latest":"0.1.0"},"name":"blockhash-core","time":{"created":"2022-01-27T08:14:32.405Z","modified":"2022-01-27T08:14:32.405Z","0.1.0":"2019-12-07T13:15:37.100Z"},"readme":"# Blockhash Core\n\nThis is the core implementation of the [blockhash perceptual image hashing algorithm](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')\n\nconst image = new ImageData(/* ... */)\nconst result = bmvbhash(image, 16)\n\nconsole.log(result)\n//=> 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.","users":{}}