Skip to content

Commit b5251bb

Browse files
committed
docs: added section for phash distance
1 parent 9cd89d8 commit b5251bb

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

README.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -317,6 +317,14 @@ Returns
317317

318318
Both the `token` and `expire` parameters are optional. If not specified the SDK uses the [uuid](https://www.npmjs.com/package/uuid) package to generate a random token and also generates a valid expiry timestamp internally. The value of the `token` and `expire` used to generate the signature are always returned in the response, no matter if they are provided as an input to this method or not.
319319

320+
### Distance calculation for pHashes
321+
322+
Calculate the distance between pHash strings of two images. Accepts two pHash hexadecimal strings and returns a numeric value indicative of the level of difference between the two images.
323+
324+
```
325+
const distance = imagekit.pHashDistance(firstHash, secondHash);
326+
```
327+
320328
## Support
321329

322330
For any feedback or to report any issues or general implementation support please reach out to [[email protected]](mailto:[email protected])

0 commit comments

Comments
 (0)