Skip to main content

Image hashing powered by Rust!

Project description

Image Hashing powered by Rust

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
  • Difference Hash
  • Perceptual Hash

If you want to know more about the different hashes or how they get encoded / decoded, check the documentation of imghash-rs.

Getting Started

To get started add the package to your project:

pip install imghash-rs

Then you can use it by importing the different functions:

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

To learn more about the underlying bit matrix that gets generated, check this document.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

imghash_rs-0.3.0.tar.gz (453.6 kB view hashes)

Uploaded Source

Built Distributions

imghash_rs-0.3.0-cp312-none-win_amd64.whl (837.5 kB view hashes)

Uploaded CPython 3.12 Windows x86-64

imghash_rs-0.3.0-cp312-none-win32.whl (820.6 kB view hashes)

Uploaded CPython 3.12 Windows x86

imghash_rs-0.3.0-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (1.1 MB view hashes)

Uploaded CPython 3.12 manylinux: glibc 2.17+ x86-64

imghash_rs-0.3.0-cp312-cp312-manylinux_2_17_s390x.manylinux2014_s390x.whl (1.2 MB view hashes)

Uploaded CPython 3.12 manylinux: glibc 2.17+ s390x

imghash_rs-0.3.0-cp312-cp312-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl (1.2 MB view hashes)

Uploaded CPython 3.12 manylinux: glibc 2.17+ ppc64le

imghash_rs-0.3.0-cp312-cp312-manylinux_2_17_armv7l.manylinux2014_armv7l.whl (1.1 MB view hashes)

Uploaded CPython 3.12 manylinux: glibc 2.17+ ARMv7l

imghash_rs-0.3.0-cp312-cp312-manylinux_2_17_aarch64.manylinux2014_aarch64.whl (1.1 MB view hashes)

Uploaded CPython 3.12 manylinux: glibc 2.17+ ARM64

imghash_rs-0.3.0-cp312-cp312-macosx_11_0_arm64.whl (970.2 kB view hashes)

Uploaded CPython 3.12 macOS 11.0+ ARM64

imghash_rs-0.3.0-cp312-cp312-macosx_10_12_x86_64.whl (1.0 MB view hashes)

Uploaded CPython 3.12 macOS 10.12+ x86-64

imghash_rs-0.3.0-cp311-none-win_amd64.whl (838.0 kB view hashes)

Uploaded CPython 3.11 Windows x86-64

imghash_rs-0.3.0-cp311-none-win32.whl (821.9 kB view hashes)

Uploaded CPython 3.11 Windows x86

imghash_rs-0.3.0-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (1.1 MB view hashes)

Uploaded CPython 3.11 manylinux: glibc 2.17+ x86-64

imghash_rs-0.3.0-cp311-cp311-manylinux_2_17_s390x.manylinux2014_s390x.whl (1.2 MB view hashes)

Uploaded CPython 3.11 manylinux: glibc 2.17+ s390x

imghash_rs-0.3.0-cp311-cp311-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl (1.2 MB view hashes)

Uploaded CPython 3.11 manylinux: glibc 2.17+ ppc64le

imghash_rs-0.3.0-cp311-cp311-manylinux_2_17_armv7l.manylinux2014_armv7l.whl (1.1 MB view hashes)

Uploaded CPython 3.11 manylinux: glibc 2.17+ ARMv7l

imghash_rs-0.3.0-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl (1.1 MB view hashes)

Uploaded CPython 3.11 manylinux: glibc 2.17+ ARM64

imghash_rs-0.3.0-cp311-cp311-macosx_11_0_arm64.whl (970.5 kB view hashes)

Uploaded CPython 3.11 macOS 11.0+ ARM64

imghash_rs-0.3.0-cp311-cp311-macosx_10_12_x86_64.whl (1.0 MB view hashes)

Uploaded CPython 3.11 macOS 10.12+ x86-64

imghash_rs-0.3.0-cp310-none-win_amd64.whl (838.2 kB view hashes)

Uploaded CPython 3.10 Windows x86-64

imghash_rs-0.3.0-cp310-none-win32.whl (822.1 kB view hashes)

Uploaded CPython 3.10 Windows x86

imghash_rs-0.3.0-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (1.1 MB view hashes)

Uploaded CPython 3.10 manylinux: glibc 2.17+ x86-64

imghash_rs-0.3.0-cp310-cp310-manylinux_2_17_s390x.manylinux2014_s390x.whl (1.2 MB view hashes)

Uploaded CPython 3.10 manylinux: glibc 2.17+ s390x

imghash_rs-0.3.0-cp310-cp310-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl (1.2 MB view hashes)

Uploaded CPython 3.10 manylinux: glibc 2.17+ ppc64le

imghash_rs-0.3.0-cp310-cp310-manylinux_2_17_armv7l.manylinux2014_armv7l.whl (1.1 MB view hashes)

Uploaded CPython 3.10 manylinux: glibc 2.17+ ARMv7l

imghash_rs-0.3.0-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl (1.1 MB view hashes)

Uploaded CPython 3.10 manylinux: glibc 2.17+ ARM64

imghash_rs-0.3.0-cp310-cp310-macosx_11_0_arm64.whl (971.3 kB view hashes)

Uploaded CPython 3.10 macOS 11.0+ ARM64

imghash_rs-0.3.0-cp310-cp310-macosx_10_12_x86_64.whl (1.0 MB view hashes)

Uploaded CPython 3.10 macOS 10.12+ x86-64

imghash_rs-0.3.0-cp39-none-win_amd64.whl (839.0 kB view hashes)

Uploaded CPython 3.9 Windows x86-64

imghash_rs-0.3.0-cp39-none-win32.whl (821.4 kB view hashes)

Uploaded CPython 3.9 Windows x86

imghash_rs-0.3.0-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (1.1 MB view hashes)

Uploaded CPython 3.9 manylinux: glibc 2.17+ x86-64

imghash_rs-0.3.0-cp39-cp39-manylinux_2_17_s390x.manylinux2014_s390x.whl (1.2 MB view hashes)

Uploaded CPython 3.9 manylinux: glibc 2.17+ s390x

imghash_rs-0.3.0-cp39-cp39-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl (1.2 MB view hashes)

Uploaded CPython 3.9 manylinux: glibc 2.17+ ppc64le

imghash_rs-0.3.0-cp39-cp39-manylinux_2_17_armv7l.manylinux2014_armv7l.whl (1.1 MB view hashes)

Uploaded CPython 3.9 manylinux: glibc 2.17+ ARMv7l

imghash_rs-0.3.0-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl (1.1 MB view hashes)

Uploaded CPython 3.9 manylinux: glibc 2.17+ ARM64

imghash_rs-0.3.0-cp39-cp39-macosx_11_0_arm64.whl (973.5 kB view hashes)

Uploaded CPython 3.9 macOS 11.0+ ARM64

imghash_rs-0.3.0-cp39-cp39-macosx_10_12_x86_64.whl (1.0 MB view hashes)

Uploaded CPython 3.9 macOS 10.12+ x86-64

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page