Skip to content

Commit

Permalink
updated readme to reference correct methods and include some badges (#4)
Browse files Browse the repository at this point in the history
  • Loading branch information
YannickAlex07 authored Aug 9, 2024
1 parent bb5b5c0 commit 37694ce
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
# Image Hashing powered by Rust

[![PyPI - Version](https://img.shields.io/pypi/v/imghash-rs)](https://pypi.org/project/imghash-rs/)
[![PyPI - Python Version](https://img.shields.io/pypi/pyversions/imghash-rs)](https://pypi.org/project/imghash-rs/)
[![PyPI - Downloads](https://img.shields.io/pypi/dw/imghash-rs)](https://pypistats.org/packages/imghash-rs)

This package is a thin wrapper that contains Python bindings for the Rust crate `imghash-rs` that allows you to generate various image hashes. the following hashes are supported:

* Average Hash
Expand All @@ -23,8 +27,8 @@ from imghash import average_hash, difference_hash, perceptual_hash

ahash = average_hash("path/to/image")

print(ahash.hex()) # will return the hash encoded as string
print(ahash.bits()) # will return a 2D list of bools that are the encoded bits
print(ahash.encode()) # will return the hash encoded as string
print(ahash.matrix()) # will return a 2D list of bools that are the encoded bits
```

To learn more about the underlying bit matrix that gets generated, check this [document](https://github.com/YannickAlex07/imghash-rs/blob/main/docs/encoding.md).

0 comments on commit 37694ce

Please sign in to comment.