https://github.com/nocduro/rayon-thumbnail-example
Resize all .jpg in current directory into thumbnails using multiple threads
https://github.com/nocduro/rayon-thumbnail-example
image rayon rust
Last synced: 10 months ago
JSON representation
Resize all .jpg in current directory into thumbnails using multiple threads
- Host: GitHub
- URL: https://github.com/nocduro/rayon-thumbnail-example
- Owner: nocduro
- License: mit
- Created: 2017-08-29T05:03:46.000Z (almost 9 years ago)
- Default Branch: master
- Last Pushed: 2017-09-25T00:23:58.000Z (almost 9 years ago)
- Last Synced: 2025-01-16T12:02:26.166Z (over 1 year ago)
- Topics: image, rayon, rust
- Language: Rust
- Homepage:
- Size: 10.7 KB
- Stars: 1
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# rayon-image-resizer
## Overview
Uses the `glob`, `image`, and `rayon` crates to resize all of the .jpg in the current directory
into a `thumbnails` folder.
## Usage
run with: `cargo run --release` with some .jpg images in the top level directory of the repository.
## Results
Test was run against 196 images from an 18MP dslr (~1GB of images).
Used the `Nearest` resize algorithm from the `image` crate, resizing to a 300px thumbnail.
Results from i5 4670k (4 cores/threads):
* No rayon: 63.837 seconds ~50% cpu usage
* With rayon: 33.094 seconds ~97% cpu usage