imagehash
The imagehash crate provides image hashing algorithms.
Supported Algorithms
- Average Hash (aHash)
- Difference Hash (dHash)
- Perceptual Hash (pHash)
Usage
let img_filename = "tests/1.jpg";
let img = open.unwrap;
// Simple usage
let hash = average_hash;
println!; // hex-encoded hash string
// Advanced usage
let hasher = new
.with_image_size
.with_hash_size
.with_resizer;
let hash = hasher.hash;
println!; // hex-encoded hash string