[−][src]Function blockhash::blockhash256
pub fn blockhash256<I: Image>(img: &I) -> Blockhash256
Generates a 256-bit perceptual hash of an image.
Examples
use blockhash::{blockhash256, Blockhash256}; let img = image::open("images/512x512_rgb.png").unwrap(); let hash = blockhash256(&img); assert_eq!( hash, Blockhash256::from([ 0x9c, 0xfd, 0xe0, 0x3d, 0xc4, 0x19, 0x84, 0x67, 0xad, 0x67, 0x1d, 0x17, 0x1c, 0x07, 0x1c, 0x5b, 0x1f, 0xf8, 0x1b, 0xf9, 0x19, 0xd9, 0x18, 0x18, 0x38, 0xf8, 0xf8, 0x90, 0xf8, 0x07, 0xff, 0x01, ]), );