Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/abonander/img_hash
/ functions
Functions
62 in github.com/abonander/img_hash
⨍
Functions
62
◇
Types & classes
15
↓ 4 callers
Method
as_slice
(&self)
src/traits.rs:41
↓ 3 callers
Function
gradient_hash
(luma: &'a [T], rowstride: usize)
src/alg/mod.rs:159
↓ 3 callers
Function
vert_gradient_hash
(luma: &'a [T], rowstride: usize)
src/alg/mod.rs:163
↓ 2 callers
Function
block_adder
(blocks: &'a mut [T], width: u32)
src/alg/blockhash.rs:59
↓ 2 callers
Function
blockhash
(img: &I, width: u32, height: u32)
src/alg/blockhash.rs:14
↓ 2 callers
Method
blur
(&self, sigma: f32)
src/traits.rs:158
↓ 2 callers
Function
double_gradient_hash
(luma: &'a [T], rowstride: usize)
src/alg/mod.rs:168
↓ 2 callers
Method
foreach_pixel8
(&self, mut foreach: F)
src/traits.rs:160
↓ 2 callers
Function
next_multiple_of_2
(x: u32)
src/alg/mod.rs:83
↓ 2 callers
Function
next_multiple_of_4
(x: u32)
src/alg/mod.rs:84
↓ 2 callers
Method
resize_dimensions
(&self, width: u32, height: u32)
src/alg/mod.rs:131
↓ 2 callers
Function
sum_px
(chans: &[u8])
src/alg/blockhash.rs:139
↓ 1 callers
Method
as_bytes
Get the bytes of this hash.
src/lib.rs:423
↓ 1 callers
Function
blockhash_fast
(img: &I, hwidth: u32, hheight: u32)
src/alg/blockhash.rs:118
↓ 1 callers
Function
blockhash_slow
(img: &I, hwidth: u32, hheight: u32)
src/alg/blockhash.rs:63
↓ 1 callers
Method
calc_hash_vals
If DCT preprocessing is configured, produce a vector of floats, otherwise a vector of bytes.
src/lib.rs:373
↓ 1 callers
Method
crop_2d
(&self, packed: Vec<f32>)
src/dct.rs:73
↓ 1 callers
Function
crop_2d_dct
Crop the values off a 1D-packed 2D DCT. Returns `packed` truncated to the premultiplied size, as determined by `rowstride` Generic for easier testin
src/dct.rs:83
↓ 1 callers
Method
dct_2d
Perform a 2D DCT on a 1D-packed vector with a given `width x height`. Assumes `packed_2d` is double-length for scratch space. Returns the vector trun
src/dct.rs:45
↓ 1 callers
Function
debug_filter_type
(ft: &FilterType)
src/lib.rs:487
↓ 1 callers
Method
diff_inplace
(&mut self, other: &Self)
src/traits.rs:182
↓ 1 callers
Method
gauss_preproc
If Difference of Gaussians preprocessing is configured, produce a new image with it applied.
src/lib.rs:360
↓ 1 callers
Method
hash_image
(&self, ctxt: &HashCtxt, image: &I)
src/alg/mod.rs:87
↓ 1 callers
Method
hash_size
Set a new hash width and height; these can be the same. The number of bits in the resulting hash will be `width * height`. If you are using a fixed-s
src/lib.rs:184
↓ 1 callers
Method
height
(&self)
src/dct.rs:34
↓ 1 callers
Function
mean_hash_f32
(luma: &'a [f32])
src/alg/mod.rs:148
↓ 1 callers
Function
mean_hash_u8
(luma: &'a [u8])
src/alg/mod.rs:143
↓ 1 callers
Function
median_of_3
(mut x: T, mut y: T, mut z: T)
src/alg/blockhash.rs:206
↓ 1 callers
Function
partition
(data: &mut [T])
src/alg/blockhash.rs:179
↓ 1 callers
Method
preproc_diff_gauss_sigmas
Enable preprocessing with the Difference of Gaussians algorithm with the given sigma values. Recommended only for use with [the Blockhash.io algorith
src/lib.rs:261
↓ 1 callers
Function
qselect_inplace
(data: &mut [T], k: usize)
src/alg/blockhash.rs:158
↓ 1 callers
Method
round_hash_size
(&self, width: u32, height: u32)
src/alg/mod.rs:123
↓ 1 callers
Method
to_grayscale
(&self)
src/lib.rs:336
↓ 1 callers
Method
to_hasher
Create a [`Hasher`](struct.Hasher.html) from this config which can be used to hash images. ### Panics If the chosen hash size (`width x height`, roun
src/lib.rs:270
↓ 1 callers
Method
width
(&self)
src/dct.rs:30
Function
bench_functions
(c: &mut Criterion)
benches/byte_to_float.rs:19
Method
dist
Calculate the Hamming distance between this and `other`. Equivalent to counting the 1-bits of the XOR of the two hashes. Essential to determining th
src/lib.rs:452
Method
fmt
(&self, f: &mut fmt::Formatter)
src/lib.rs:301
Method
from_base64
Create an `ImageHash` instance from the given Base64-encoded string. ## Errors: Returns `InvaidBytesError::Base64(DecodeError::InvalidLength)` if the
src/lib.rs:461
Method
from_bools
(iter: I)
src/traits.rs:106
Method
from_bytes
Create an `ImageHash` instance from the given bytes. ## Errors: Returns a `InvalidBytesError::BytesWrongLength` error if the slice passed can't fit i
src/lib.rs:429
Method
from_iter
(iter: I)
src/traits.rs:31
Function
get_median
(data: &[T])
src/alg/blockhash.rs:150
Function
gradient_hash_impl
The guts of the gradient hash separated so we can reuse them
src/alg/mod.rs:154
Method
hamming
(&self, other: &Self)
src/traits.rs:110
Method
hash_alg
Set the algorithm used to generate hashes. Each algorithm has different performance characteristics.
src/lib.rs:199
Method
hash_image
Calculate a hash for the given image with the configured options.
src/lib.rs:324
Function
main
()
src/bin/hash_image.rs:10
Method
max_bits
()
src/traits.rs:37
Method
new
(width: u32, height: u32)
src/dct.rs:17
Method
new
Construct a new hasher config with sane, reasonably fast defaults. A default hash container type is provided as a default type parameter which is gua
src/lib.rs:139
Method
next
(&mut self)
src/traits.rs:88
Method
preproc_dct
Enable preprocessing with the Discrete Cosine Transform (DCT). Does nothing when used with [the Blockhash.io algorithm](HashAlg::Blockhash) which doe
src/lib.rs:233
Method
preproc_diff_gauss
Enable preprocessing with the Difference of Gaussians algorithm with default sigma values. Recommended only for use with [the Blockhash.io algorithm]
src/lib.rs:243
Method
resize_filter
Set the filter used to resize images during hashing. Note when picking a filter that images are almost always reduced in size. Has no effect with the
src/lib.rs:192
Method
size_hint
(&self)
src/traits.rs:95
Function
test_bools_to_bytes
()
src/traits.rs:212
Function
test_crop_2d_dct
()
src/dct.rs:105
Function
test_transpose
()
src/dct.rs:120
Method
to_base64
Get a Base64 string representing the bits of this hash. Mostly for printing convenience.
src/lib.rs:470
Method
to_grayscale
(&self)
src/traits.rs:154
Method
with_bytes_type
Construct a new config with the selected [`HashBytes`](trait.HashBytes.html) impl. You may opt for an array type which allows inline allocation of ha
src/lib.rs:150