A program that implements the blur hash algorithm using multithreading.
To run the program you must compile it for now by running cargo build --release
then run the binary by running ./target/release/blur-hash-rust <image.png>
.
Running the program on a 4k image
Type | Time (seconds) |
---|---|
Single Threaded | 10.515 |
Multithreaded | 2.726 |
Multithreaded (sample rate: 10) | 0.089 |
Sample Rate | Time (seconds) | Output |
---|---|---|
Original | ||
1 | 2.742 | |
2 | 0.745 | |
10 | 0.089 | |
100 | 0.060 | |
500 | 0.065 | |
1000 | 0.061 |
Usage: blur-hash-rust [OPTIONS] <FILEPATH>
Arguments:
<FILEPATH> Path to the image file
Options:
-x <X> x component of the hash (1-9) [default: 4]
-y <Y> y component of the hash (1-9) [default: 4]
-s <STEP> step size for the sampling [default: 1]
-h, --help Print help
-V, --version Print version