Expand description
rosetta-squint — point at an image (path or bytes), get the same hash hex string as every other rosetta-squint port for the same input.
§Examples
use rosetta_squint::{phash, phash_bytes};
let h = phash("photo.jpg", 8).unwrap();
println!("{}", h);Structs§
- Hash
- Image
Multi Hash - A collection of per-segment hashes produced by
crop_resistant_hash.
Enums§
Constants§
- MAX_
FILE_ SIZE - Reject path-based decode of files that are too large or are non-regular
(e.g.,
/dev/zero, named pipes, character devices) BEFORE reading bytes. Callers that genuinely need to process images larger than this threshold should decode via rosetta-squint-decode directly after explicit validation.
Functions§
- average_
hash - Compute average_hash from a file path.
- average_
hash_ bytes - Compute average_hash from raw bytes.
- colorhash
- Compute colorhash from a file path.
- colorhash_
bytes - Compute colorhash from raw bytes.
- crop_
resistant_ hash - Compute crop_resistant_hash from a file path.
- crop_
resistant_ hash_ bytes - Compute crop_resistant_hash from raw bytes.
- decode_
file - Read a file from disk and decode it to a
DynamicImage. - decode_
to_ image - Decode raw image bytes via rosetta-squint-decode and return a
DynamicImage. - dhash
- Compute dhash from a file path.
- dhash_
bytes - Compute dhash from raw bytes.
- dhash_
vertical - Compute dhash_vertical from a file path.
- dhash_
vertical_ bytes - Compute dhash_vertical from raw bytes.
- hex_
to_ flathash - hex_
to_ hash - hex_
to_ multihash - Parse a comma-separated multi-hash hex string into an
ImageMultiHash. - phash
- Compute phash from a file path.
- phash_
bytes - Compute phash from raw bytes.
- phash_
simple - Compute phash_simple from a file path.
- phash_
simple_ bytes - Compute phash_simple from raw bytes.
- whash_
db4 - Compute whash_db4 from a file path.
- whash_
db4_ bytes - Compute whash_db4 from raw bytes.
- whash_
db4_ robust - Compute whash_db4_robust from a file path.
- whash_
db4_ robust_ bytes - Compute whash_db4_robust from raw bytes.
- whash_
haar - Compute whash_haar from a file path.
- whash_
haar_ bytes - Compute whash_haar from raw bytes.