Trait ImageHasher
Source pub trait ImageHasher {
// Required method
fn hash_from_img(&self, img: &DynamicImage) -> ImageHash;
// Provided method
fn hash_from_path(&self, path: &Path) -> Result<ImageHash, ImageError> { ... }
}
Expand description
Trait for generating image hashes
Generates a hash for a given image.
§Arguments
img
- The image to generate the hash for.
§Returns
The generated image hash.
Generates a hash for an image specified by its file path.
§Arguments
path
- The path to the image file.
§Returns
The generated image hash.