Function blockhash::blockhash256

source ·
pub fn blockhash256<I: Image>(img: &I) -> Blockhash256
Expand description

Generates a 256-bit perceptual hash of an image.

§Examples

use blockhash::{blockhash256, Blockhash256};

let img = image::open("images/example.png").unwrap();
let hash = blockhash256(&img);

assert_eq!(
    hash.to_string(),
    "e07ef07ef078e090e0ffc0ffc066c043c043c065f03dfc3f7c7e7fdc2eb20080",
);