A small tool for image hash generation developed using Rust, supports simple renaming mode
The output format is hex string (default lowercase) or base64 string
-
Download pre-compiled binaries from the Github Release page
-
Download source code and compile it
git clone https://github.com/zhangzhilinx/imghasher.git
cd imghasher
cargo install --path .
imghasher [ARGS]...
- Soon
cargo install imghasher
will be supported!
imghasher 0.1.2
ZhangZhilin <[email protected]>
A tool for image hash generation developed using Rust
USAGE:
imghasher [FLAGS] [OPTIONS] <FILE>...
FLAGS:
-b, --base64 Output in base64
-f, --force Do not prompt before overwriting
-h, --help Prints help information
-i, --interactive Prompt before overwrite
-q, --quiet No output, suitable for rename mode
-R, --recursive Process directories recursively
--rename Rename the image file name to the corresponding hash
-U, --upper Output in uppercase, ignored in base64 mode
-V, --version Prints version information
OPTIONS:
-a, --algo <algorithm> Choose a hash algorithm [default: dhash] [values: ahash, dct_ahash, dhash, dct_dhash]
ARGS:
<FILE>... Sets the input files or directories to use
The supported hash algorithms are:
ahash
: Average Hashdct_ahash
: DCT-processed aHash, or pHashdhash
: Difference Hash / Gradient Hashdct_dhash
: DCT-processed dHash
However, the output of the dct_ahash algorithm implementation is a bit weird, so we suggest using dct_dhash instead.
-
Support for reading from standard input
-
Support for shell (e.g. bash) completions
-
Refinement of shell return codes (error codes)
-
Multi-threaded parallel support
-
Support for
cargo install
- Fork it!
- Create your feature branch:
git checkout -b my-new-feature
- Commit your changes:
git commit -am 'feat: add some feature'
- Push to the branch:
git push origin my-new-feature
- Submit a pull request :D
MIT © zhangzhilinx