fast-dhash

Crates.iofast-dhash
lib.rsfast-dhash
version0.1.0
sourcesrc
created_at2023-03-29 20:34:45.130227
updated_at2023-03-29 20:34:45.130227
descriptionA fast rust implementation of the perceptual hash dhash
homepage
repositoryhttps://github.com/9elt/fast-dhash
max_upload_size
id824374
size14,302
Lorenzo Cicuttin (9elt)

documentation

README

fast dhash

A fast rust implementation of the perceptual hash "dhash".

The main difference with other rust implementations, and the reason it is called "fast", is that it doesn't use grayscale and resize_exact image methods, therefore running about ~50% faster

basic usage

use fast_dhash::Dhash;

use image;
use std::path::Path;

fn main() {
    let path = Path::new("../image.jpg");
    let image = image::open(path);

    if let Ok(image) = image {
        let hash = Dhash::new(&image);
        println!("hash: {}", hash);
        // hash: d6a288ac6d5cce14
    }
}
Commit count: 2

cargo fmt